A python wrapper for REAPER

Related tags

Audiopyreaper
Overview
Comments
  • Compilation error: cannot initialize a parameter of type 'int32_t *'

    Compilation error: cannot initialize a parameter of type 'int32_t *'

    Hi, I've being trying to install pyreaper, first with pip install pyreaper and then by cloning the repository and doing: git submodule update --init --recursive python setup.py build (I also tried python setup.py develop)

    however in each case I got this error:

    pyreaper/creaper.cpp:4153:155: error: cannot initialize a parameter of type 'int32_t *' (aka 'int *') with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')

    it was preceded by this warning (although I think it's independent from the error message). warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

    Have you encountered this error before ?

    bug help wanted 
    opened by cveaux 14
  • This is a bug when the frame_period parameter is set to 0.016

    This is a bug when the frame_period parameter is set to 0.016

    hello,

    There is a wav example (Maybe I will sent it by email). I just to extract the pitch features, but unfortunately when I use the frame_period and it is set to 0.016 rather than the default value 0.005. The code didn't work, the error is: image

    However, when I change the frame_period to default value 0.005, the code is ok. So how to deal with it? and could you fix the bug? Thx

    opened by gemengtju 6
  • Option to suppress REAPER output

    Option to suppress REAPER output

    Hi,

    Is there any method I can use to suppress printing statements like

    Residual symmetry: P:2468.209473  N:1539.423462  MEAN:0.045802
    Inverting signal
    

    when I run pyreaper.reaper()?

    I tried using a context like this:

    class DummyFile(object):
        def write(self, x): pass
    
    @contextlib.contextmanager
    def suppress_print():
        save_stdout = sys.stdout
        save_stderr = sys.stderr
        sys.stdout = DummyFile()
        sys.stderr = DummyFile()
        yield
        sys.stdout = save_stdout
        sys.stderr = save_stderr
    

    but it doesn't work. I guess since cython is used, the output is going through somewhere else besides stdout.

    opened by terriyu 5
  • Fixed compilation on windows

    Fixed compilation on windows

    I have fixed the compiler error preventing the installation on Windows. MSVC refused to cast the pointers, but both pointers should point to typedef'ed int32_t on all platforms so reinterpret_cast should not be a problem here. This also fixes #6.

    opened by OrcusCZ 3
  • Pyreaper pypi package

    Pyreaper pypi package

    In the pypi released package there's a built reaper.cpp which is incompatible with python3.7. I got these errors:

    pyreaper/creaper.cpp:8197:69: error: too many arguments to function
             return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
                                                                             ^
        pyreaper/creaper.cpp: In function ‘void __Pyx__ExceptionSave(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
        pyreaper/creaper.cpp:9364:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
             *type = tstate->exc_type;
                             ^~~~~~~~
                             curexc_type
        pyreaper/creaper.cpp:9365:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
             *value = tstate->exc_value;
                              ^~~~~~~~~
                              curexc_value
        pyreaper/creaper.cpp:9366:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
             *tb = tstate->exc_traceback;
                           ^~~~~~~~~~~~~
                           curexc_traceback
        pyreaper/creaper.cpp: In function ‘void __Pyx__ExceptionReset(PyThreadState*, PyObject*, PyObject*, PyObject*)’:
        pyreaper/creaper.cpp:9373:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
             tmp_type = tstate->exc_type;
                                ^~~~~~~~
                                curexc_type
        pyreaper/creaper.cpp:9374:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
             tmp_value = tstate->exc_value;
                                 ^~~~~~~~~
                                 curexc_value
        pyreaper/creaper.cpp:9375:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
             tmp_tb = tstate->exc_traceback;
                              ^~~~~~~~~~~~~
                              curexc_traceback
        pyreaper/creaper.cpp:9376:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
             tstate->exc_type = type;
                     ^~~~~~~~
                     curexc_type
        pyreaper/creaper.cpp:9377:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
             tstate->exc_value = value;
                     ^~~~~~~~~
                     curexc_value
        pyreaper/creaper.cpp:9378:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
             tstate->exc_traceback = tb;
                     ^~~~~~~~~~~~~
                     curexc_traceback
        pyreaper/creaper.cpp: In function ‘int __Pyx__GetException(PyThreadState*, PyObject**, PyObject**, PyObject**)’:
        pyreaper/creaper.cpp:9433:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
             tmp_type = tstate->exc_type;
                                ^~~~~~~~
                                curexc_type
        pyreaper/creaper.cpp:9434:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
             tmp_value = tstate->exc_value;
                                 ^~~~~~~~~
                                 curexc_value
        pyreaper/creaper.cpp:9435:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
             tmp_tb = tstate->exc_traceback;
                              ^~~~~~~~~~~~~
                              curexc_traceback
        pyreaper/creaper.cpp:9436:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
             tstate->exc_type = local_type;
                     ^~~~~~~~
                     curexc_type
        pyreaper/creaper.cpp:9437:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
             tstate->exc_value = local_value;
                     ^~~~~~~~~
                     curexc_value
        pyreaper/creaper.cpp:9438:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
             tstate->exc_traceback = local_tb;
                     ^~~~~~~~~~~~~
                     curexc_traceback
        error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    

    I think it would be better to delete it and rebuild extension using Cython from scratch during installation. In that case installation is fine.

    bug 
    opened by vladbataev 3
  • Small differences between pyreaper and original REAPER

    Small differences between pyreaper and original REAPER

    Hi, I ran pyreaper and the original Google REAPER on some wav files. The F0 results are very similar, but there are a few small differences even though I think I am using the same parameters. Do you know why there are differences?

    For pyreaper, I'm running the following commands in my Python script:

    from scipy.io import wavfile from pyreaper import reaper fs, y = wavfile.read('my-wavfile.wav') pm_times, pm, F0_times, F0, corr = reaper(y, fs, minf0=40.0, maxf0=500.0, do_high_pass=True, do_hilbert_transform=False, inter_pulse=0.01, frame_period=0.001)

    For Google's original REAPER, I'm running this on the command line:

    $ ./reaper -i my-wavfile.wav -f f0.txt -p pitchmarks.txt -c corr.txt -s -e 0.001 -x 500.0 -m 40.0 -u 0.01 -a

    opened by terriyu 3
  • python is crashing with 'malloc' error when batch processing

    python is crashing with 'malloc' error when batch processing

    When I apply a pyreaper.reaper function on a folder of files, it's crashing with this error:

    python(94746,0x119755dc0) malloc: Incorrect checksum for freed object 0x7f9d2c43d780: probably modified after being freed. Corrupt value: 0x800000003f052325 python(94746,0x119755dc0) malloc: *** set a breakpoint in malloc_error_break to debug Abort trap: 6

    I tried python 3.6.9 with pyreaper 0.0.8 and 0.0.6 and python 3.7.8 with pyreaper 0.0.8. Here is an output from the report on mac os in case that might help:

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff6e86033a __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff6e91ce60 pthread_kill + 430 2 libsystem_c.dylib 0x00007fff6e7e7808 abort + 120 3 libsystem_malloc.dylib 0x00007fff6e8dd50b malloc_vreport + 548 4 libsystem_malloc.dylib 0x00007fff6e8eed27 malloc_zone_error + 183 5 libsystem_malloc.dylib 0x00007fff6e8d5081 tiny_free_list_remove_ptr + 690 6 libsystem_malloc.dylib 0x00007fff6e8d4279 tiny_free_no_lock + 1018 7 libsystem_malloc.dylib 0x00007fff6e8d3d8b free_tiny + 459 8 creaper.cpython-36m-darwin.so 0x000000013ad2b952 __pyx_f_8pyreaper_7creaper_12EpochTracker_GetF0AndCorrTrack(__pyx_obj_8pyreaper_7creaper_EpochTracker*, float, Track*, Track*) + 578 9 creaper.cpython-36m-darwin.so 0x000000013ad3201a __pyx_pf_8pyreaper_7creaper_reaper_internal(_object*, tagPyArrayObject_fields*, _object*, float, float, bool, bool, float, float, float) + 5306 10 python 0x000000010eab28fb _PyCFunction_FastCallDict + 475 11 python 0x000000010eb42d4b call_function + 539 12 python 0x000000010eb3f98e _PyEval_EvalFrameDefault + 26014 13 python 0x000000010eb438aa _PyEval_EvalCodeWithName + 2698 14 python 0x000000010eb440b2 fast_function + 386 15 python 0x000000010eb42d15 call_function + 485 16 python 0x000000010eb3fa34 _PyEval_EvalFrameDefault + 26180 17 python 0x000000010eb438aa _PyEval_EvalCodeWithName + 2698 18 python 0x000000010eb440b2 fast_function + 386 19 python 0x000000010eb42d15 call_function + 485 20 python 0x000000010eb3f98e _PyEval_EvalFrameDefault + 26014 21 python 0x000000010eb438aa _PyEval_EvalCodeWithName + 2698 22 python 0x000000010eb440b2 fast_function + 386 23 python 0x000000010eb42d15 call_function + 485 24 python 0x000000010eb3f98e _PyEval_EvalFrameDefault + 26014 25 python 0x000000010eb438aa _PyEval_EvalCodeWithName + 2698 26 python 0x000000010eb440b2 fast_function + 386 27 python 0x000000010eb42d15 call_function + 485 28 python 0x000000010eb3fa34 _PyEval_EvalFrameDefault + 26180 29 python 0x000000010eb44159 fast_function + 553 30 python 0x000000010eb42d15 call_function + 485 31 python 0x000000010eb3f98e _PyEval_EvalFrameDefault + 26014 32 python 0x000000010eb44159 fast_function + 553 33 python 0x000000010eb42d15 call_function + 485 34 python 0x000000010eb3f98e _PyEval_EvalFrameDefault + 26014 35 python 0x000000010eb438aa _PyEval_EvalCodeWithName + 2698 36 python 0x000000010eb39360 PyEval_EvalCode + 48 37 python 0x000000010eb7293e PyRun_FileExFlags + 174 38 python 0x000000010eb71ede PyRun_SimpleFileExFlags + 270 39 python 0x000000010eb8e72a Py_Main + 3306 40 python 0x000000010ea59ac8 main + 248 41 libdyld.dylib 0x00007fff6e718cc9 start + 1

    opened by ap-respeecher 2
  • Pyreaper install failed on windows

    Pyreaper install failed on windows

    I got the error when I was install pyreaper

    How can I solve this problem?

    pyreaper\creaper.cpp(4680): error C2664: 'PyObject *(__pyx_obj_8pyreaper_7creaper_EpochTracker *,Track *,int32_t *)': cannot convert argument 3 from '__pyx_t_5numpy_int32_t *' to 'int32_t *'

    wontfix 
    opened by yuuSiVo 1
  • add build dependencies to fix install from source

    add build dependencies to fix install from source

    pip install pyreaper fails to install
    pip install pyreaper
    Collecting pyreaper
      Using cached pyreaper-0.0.8.tar.gz (124 kB)
      Preparing metadata (setup.py) ... error
      error: subprocess-exited-with-error
    

    × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-s03_fbrw/pyreaper_473cbdcdb56d4bc3b46dfa8bce38e114/setup.py", line 8, in import numpy as np ModuleNotFoundError: No module named 'numpy' [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

    × Encountered error while generating package metadata. ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip. hint: See above for details.

    I'tried to install from source but it seems like build dependencies (numpy, Cython) are not configured correctly

    pip install git+https://github.com/r9y9/pyreaper

    Collecting git+https://github.com/r9y9/pyreaper Cloning https://github.com/r9y9/pyreaper to /tmp/pip-req-build-gtap3quc Running command git clone --filter=blob:none --quiet https://github.com/r9y9/pyreaper /tmp/pip-req-build-gtap3quc Resolved https://github.com/r9y9/pyreaper to commit f0f09a0735edac92a54095c6752ddbd7b8a450c2 Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully.
    │ exit code: 1
    ╰─> [6 lines of output]
    Traceback (most recent call last):
    File "", line 2, in File "", line 34, in
    File "/tmp/pip-req-build-gtap3quc/setup.py", line 8, in import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    × Encountered error while generating package metadata.
    ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.

    This PR fixes that, I tested installation in isolated virtualenv and it installs correctly:

    pip install git+https://github.com/tandav/pyreaper
    pip install git+https://github.com/tandav/pyreaper
    Collecting git+https://github.com/tandav/pyreaper                                                             
      Cloning https://github.com/tandav/pyreaper to /tmp/pip-req-build-5va0xf3f
      Running command git clone --filter=blob:none --quiet https://github.com/tandav/pyreaper /tmp/pip-req-build-5va0xf3f
      Resolved https://github.com/tandav/pyreaper to commit 1d9cd22b324d4e05bde917c86f5e29c5cf6572d5
      Running command git submodule update --init --recursive -q
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting numpy>=1.8.0
      Using cached numpy-1.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
    Building wheels for collected packages: pyreaper
      Building wheel for pyreaper (pyproject.toml) ... done
      Created wheel for pyreaper: filename=pyreaper-0.0.9.dev0-cp310-cp310-linux_x86_64.whl size=614301 sha256=0aeb4a5b9f6e46bc8d46a86497386aa56ff0d5be8fc39fc3f1aef22e7cfa66be
      Stored in directory: /tmp/pip-ephem-wheel-cache-8ugsflvx/wheels/b0/2d/9b/45bf5cc06c19cc079084b01ee402d3677aa809f826ef03f90b
    Successfully built pyreaper
    Installing collected packages: numpy, pyreaper
    Successfully installed numpy-1.23.4 pyreaper-0.0.9.dev0 
    python -c 'import pyreaper' # works
    
    opened by tandav 0
  • frame_period bug

    frame_period bug

    when set the frame period to 0.0125, the pyreaper may cause memory free() error. This is random in different wavs. But it is right with the default frame period.
    something may be wrong because of the mismatch between the wave length and frame period

    opened by fanpengustc 6
  • IndexError when narrowing F0 range

    IndexError when narrowing F0 range

    pyreaper crashes when I narrow the F0 range (e.g. when I set minf0=100 and maxf0=170).

    The particular minf0 and maxf0 values that cause the crash depend on the analyzed waveform but you can try such extreme values as minf0=160 and maxf0=170 and pyreaper should crash for sure.

    The original REAPER works fine and does not crash even with the extreme F0 values.

    The error message is:

    File "/Users/jmatouse/.pyenv/versions/3.6.6/lib/python3.6/site-packages/pyreaper/__init__.py", line 95, in reaper
        unvoiced_cost)
      File "pyreaper/creaper.pyx", line 183, in pyreaper.creaper.reaper_internal
    IndexError: Out of bounds on buffer access (axis 0)
    
    bug 
    opened by jmaty 0
Releases(v0.0.8)
Owner
Ryuichi Yamamoto
Speech Synthesis, Voice Conversion, Machine Learning
Ryuichi Yamamoto
Telegram Bot to play music in VoiceChat with Channel Support and autostarts Radio.

VCPlayerBot Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media

Abdisamad Omar Mohamed 1 Oct 15, 2021
A simple python script to play bell sound in your system infinitely, just for fun and experimental purposes

A simple python script to play bell sound in your system infinitely, just for fun and experimental purposes

نافع الهلالي 1 Oct 29, 2021
PianoPlayer - Automatic fingering generator for piano scores

PianoPlayer - Automatic fingering generator for piano scores

Marco Musy 571 Jan 02, 2023
nicfit 425 Jan 01, 2023
Okaeri-Music is a telegram music bot project, allow you to play music on voice chat group telegram.

🗄️ PROJECT MUSIC,THIS IS MAINTAINED Okaeri-Music is a telegram bot project that's allow you to play music on telegram voice chat group Features 🔥 Th

Okaeri-Project 2 Dec 23, 2021
Pythonic bindings for FFmpeg's libraries.

PyAV PyAV is a Pythonic binding for the FFmpeg libraries. We aim to provide all of the power and control of the underlying library, but manage the gri

PyAV 1.8k Jan 03, 2023
A GUI-based audio player with support for a large variety of formats

Miza-Player A GUI-based audio player with support for a large variety of formats, able to play from web-hosted media platforms such as YouTube, includ

Thomas Xin 3 Dec 14, 2022
Graphical interface to control granular sound synthesis.

Granular sound synthesis interface SoundGrain is a graphical interface where users can draw and edit trajectories to control granular sound synthesis

Olivier Bélanger 122 Dec 10, 2022
This is a short program that takes the input from your microphone and uses OpenGL to draw a live colourful pattern

Visual-Music This is a short program that takes the input from your microphone and uses OpenGL to draw a live colourful pattern Installation and Setup

Tom Jebbo 1 Dec 26, 2021
Gateware for the Terasic/Arrow DECA board, to become a USB2 high speed audio interface

DECA USB Audio Interface DECA based USB 2.0 High Speed audio interface Status / current limitations enumerates as class compliant audio device on Linu

Hans Baier 16 Mar 21, 2022
This Bot can extract audios and subtitles from video files

Send any valid video file and the bot shows you available streams in it that can be extracted!!

TroJanzHEX 56 Nov 22, 2022
Expressive Digital Signal Processing (DSP) package for Python

AudioLazy Development Last release PyPI status Real-Time Expressive Digital Signal Processing (DSP) Package for Python! Laziness and object representa

Danilo de Jesus da Silva Bellini 642 Dec 26, 2022
Datamoshing with FFmpeg

ffmosher Datamoshing with FFmpeg Drag and drop video onto mosh.bat to create a datamoshed video. To datamosh an image, please ensure the file is in a

18 Sep 11, 2022
Mina - A Telegram Music Bot 5 mandatory Assistant written in Python using Pyrogram and Py-Tgcalls

Mina - A Telegram Music Bot 5 mandatory Assistant written in Python using Pyrogram and Py-Tgcalls

3 Feb 07, 2022
Music player - endlessly plays your music

Music player First, if you wonder about what is supposed to be a music player or what makes a music player different from a simple media player, read

Albert Zeyer 482 Dec 19, 2022
Analyze, visualize and process sound field data recorded by spherical microphone arrays.

Sound Field Analysis toolbox for Python The sound_field_analysis toolbox (short: sfa) is a Python port of the Sound Field Analysis Toolbox (SOFiA) too

Division of Applied Acoustics at Chalmers University of Technology 69 Nov 23, 2022
Deep learning transformer model that generates unique music sequences.

music-ai Deep learning transformer model that generates unique music sequences. Abstract In 2017, a new state-of-the-art was published for natural lan

xacer 6 Nov 19, 2022
[Singing Log] Let your program learn to sing!

[Singing Log] Let your program learn to sing! You must have thought this was changelog when you saw the English title, but it's not, it's chànggēlog. What it does is allow your program to print logs

黄巍 22 Sep 03, 2022
F.R.I.D.A.Y. ----- Female Replacement Intelligent Digital Assistant Youth

F.R.I.D.A.Y. Female Replacement Intelligent Digital Assistant Youth--Jarvis-- the virtual assistant made by python Overview This is a virtual assistan

JIB - Just Innovative Bro 4 Feb 26, 2022
Port Hitsuboku Kumi Chinese CVVC voicebank to deepvocal. / 筆墨クミDeepvocal中文音源

Hitsuboku Kumi (筆墨クミ) is a UTAU virtual singer developed by Cubialpha. This project ports Hitsuboku Kumi Chinese CVVC voicebank to deepvocal. This is the first open-source deepvocal voicebank on Gith

8 Apr 26, 2022