Skip to main content

A wrapper around the partial-tracking library Loris

Project description

loristrck is a wrapper for the C++ partial-tracking library Loris.

It is written in cython and targets python 3 (>= 3.8 at the moment). The source of the library is included as part of the project and does not need to be installed previously.

Documentation

https://loristrck.readthedocs.io


Installation

pip install loristrck

Install from source in Windows

You need to have Visual Studio installed

# From a Developer Powershell
python scripts/prepare_windows_build.py

# From a normal prompt
pip install .

Usage

import loristrck as lt

samples, sr = lt.sndreadmono("/path/to/sndfile.wav")
partials = lt.analyze(samples, sr, resolution=60)
# partials is a python list of numpy arrays
# select a subset of most significant partials
selected, noise = lt.select(partials, mindur=0.02, maxfreq=12000, minamp=-60, minbp=2)
# print each partial as data
for partial in selected:
    print(partial)
# plot selected partials
lt.plot_partials(selected)
# now resynthesize both parts separately
lt.partials_render(selected, outfile="selected.wav")
lt.partials_render(noise, outfile="noise.wav")

Each partial will be a numpy array of shape = (numbreakpoints, 5) with the columns:

time, frequency, amplitude, phase, bandwidth

See the example scripts in bin for more complete examples

Author

Eduardo Moguillansky

eduardo dot moguillansky @ gmail dot com

License

GPL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

loristrck-1.5.0-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

loristrck-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

loristrck-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

loristrck-1.5.0-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

loristrck-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

loristrck-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

loristrck-1.5.0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9Windows x86-64

loristrck-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

loristrck-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file loristrck-1.5.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: loristrck-1.5.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for loristrck-1.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 79a1b170cdb225114298a715471b4898d07057e245a368f2193d5d4ea9acfaa0
MD5 11401a26265f6153cd5b69c9f53d7f9c
BLAKE2b-256 8caa4962f8fd5cc3b0d26a72255e1ca486cd5174bade92da856b4000ab37b0e4

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06c400c78a9d47d007223fb74dbed20488974f0ef13feab22f2a3ac4ab992b91
MD5 d3d4af2847036f60084e44888c1cd130
BLAKE2b-256 b75f8264502e9ef2f3d7d1e5bc652a1fdff8345bbe07608550d1e8f759205523

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 021fe854e298b0dfb7f051692a982940248b19585fae016da072f40fc4363e09
MD5 3daf7eb40fb3dc7fd98f1441b3b1343f
BLAKE2b-256 f81b35dadb4b12996dc9ed6c837290665e952165bc49e759dfcc27ac62bd00f8

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: loristrck-1.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for loristrck-1.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 54881525b82b4f5472f2623cdf589c5d9d75fad98bb63f390d15ff11932f3530
MD5 03a0f10ecc0f568ca7bdbad38bbb6297
BLAKE2b-256 5a263ba018a720fb897fa95c68ba7c9e0627bb9c20feeabc0e16b0dd08a09ee3

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25019c5de895703792c26d9d4d74e72d0d22c8a9034e8f1ebff7f7157f614c2e
MD5 923362a922200cd081492892e26f5d24
BLAKE2b-256 9c13728d38a9984d10084e7e3d32e2f2a5a7c7624bacc9bbd96f8de64ba44da9

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b423ae2e9d7b46bd26afc61a076a3f859711bfd90c85b1b3637e236f3bb10a97
MD5 25f65d642fe1169fc44fab06d2f511e8
BLAKE2b-256 6d66aef30a5d5c1321cb6b11eaa7b7b28f59e0a50c3d8f4d0abfffeaff35ff03

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: loristrck-1.5.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for loristrck-1.5.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 428513f655a2c517ad10446a11aeae472581d9f57e6f09a14253916c47504ba5
MD5 3f4929c1a39d4c017b842b64a066e35d
BLAKE2b-256 e3806afef4190bda0f48d134387747751b3d1bbbcf2d5c9ff97394945a2bc7e4

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9dbadeaf7f7f9eed448590b53c30f664e578410cb97797422e3576dc9583bc02
MD5 b2953fb007ee8ce53c304eac915a1bdc
BLAKE2b-256 f36fc4ce8fe8fa78b8c66eeb1038f2f110083beca46d50bd9c384a23d87b79ec

See more details on using hashes here.

File details

Details for the file loristrck-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for loristrck-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 795e0c23c6d43df46f5afa235d2b1dd23546d8e4935086f994387980672d16ed
MD5 aa928fce9f9f3ce1fce235ec73208aba
BLAKE2b-256 f320f20e8800c1beec56b359ee382ddf5faf0027050d053e383b10edbc2f4510

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page