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
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
License
GPL
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for loristrck-1.5.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c28be885926089c62ef1c1d0d4af7b638c28aa82d1c32a6ed039a89eb29b5f90 |
|
MD5 | bee3eb9baff84dd71213ed4c48226488 |
|
BLAKE2b-256 | ad2717d77167efa8e89e077d536343181b66be0480709b349dfcc0f37582780e |
Close
Hashes for loristrck-1.5.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fc7d62a0e27373cf63c19afec14d605ff9d27adddb8789f6c377bcd6a4f11e9 |
|
MD5 | 90f7f86e51e3aa503bab1861c186c193 |
|
BLAKE2b-256 | 795a64926bd4e309f43e549722f83efed1020eb04267d22d74518e6cba6f2bd3 |
Close
Hashes for loristrck-1.5.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce8a3a1d0f20e1c62808563006c73602d70a31ae119cd12180239f56fdaeb6ad |
|
MD5 | 2d1e1b00924f3278f33fb024a007189a |
|
BLAKE2b-256 | 51e2a5299ee1d3f9b052916cc1330ad44d17b25bd65bde5fcdc421ba2229cd58 |
Close
Hashes for loristrck-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0d9bbd148f3469ff94bfeda47c265cf81a7b1b12905578612c1a05fb050ea0 |
|
MD5 | c8d154979dc951ab19eb50146ab4fe58 |
|
BLAKE2b-256 | 1e6d1f57b8d839c993bf74a45ed440aa5ec6b330f63fa243785b71a74c53ab6c |
Close
Hashes for loristrck-1.5.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93d8c8573675cb2aee5f49126b08c17c18b9588f59c50fc8fb6de985e59eafc4 |
|
MD5 | 91d9b409b374621f3da74caa3d2e2c3d |
|
BLAKE2b-256 | be7af6325dadb186bd6275523a9b17622d382f26866d806098f1cdfcefe97421 |
Close
Hashes for loristrck-1.5.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53bc6669327f6229d462936c107d6ce87a251cb071b9d4e764c74b9af639f563 |
|
MD5 | 00c60836956543e82b100e789c933d62 |
|
BLAKE2b-256 | 2e7bbbb4c386184dc1162254ced0fb52977e7cfd12ce7c315a6576593e795aab |
Close
Hashes for loristrck-1.5.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3e44c1c40f3479ec68d229572bfc15375297a2ea9db537b42c555c9b934da8f |
|
MD5 | adab66c3afedb661f934652ceaea2bf5 |
|
BLAKE2b-256 | 9b0cfea0ab7f5b420e0b95024410aaf44df3bc2c9f3f53b33d0f548509e4e501 |
Close
Hashes for loristrck-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8757d2542be04692c15171963452a7b90027388167cc74673f4d6a678d3d33c |
|
MD5 | 01214e3d6c7bf84af5f02918342fb414 |
|
BLAKE2b-256 | 90c1e9a23f288ac01a2bb17ff0171833018ccf213556eb62931b6e436629103e |
Close
Hashes for loristrck-1.5.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed64ab2a69bda31d581758e91e4a10dd4b487dfc49de4368c8a751524e557f7b |
|
MD5 | 1d54df87136b6c34a080230c487ea0e1 |
|
BLAKE2b-256 | 922aaeb113dda611885a70bc701fabdc0d5999b35cfe2ae08547f2cfaed3af3d |
Close
Hashes for loristrck-1.5.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 037aefd9f8d34c12a39d8fbe4874f6ff9a420381f15fe94905a02d4962de87e9 |
|
MD5 | 70d15b3434c5be42d7804bbbaea14015 |
|
BLAKE2b-256 | b6855f029dca31fc70f5824d2c674bcf788783b7b22e8329eae71d13f8ac01d7 |
Close
Hashes for loristrck-1.5.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66e95b5dcc705e4fafcabfe2158989a825f8869fa2acbdb280ffe8c2bad777d5 |
|
MD5 | b81b98da556d8a875ff9828b7733c4bc |
|
BLAKE2b-256 | d71f3650b8995002ecb6f046f9cd6629882e9c4a481ae9e1bc71ce1a9c8d9be9 |
Close
Hashes for loristrck-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c74419df4b94aaace1de29c9b5551402035176e7bd2ef54413c826eabcc93af5 |
|
MD5 | 4e0404a42118d423f59cf01f232053be |
|
BLAKE2b-256 | 05504459653b8971229f17c9b395f4ac022f782d7b3b491ca9c5efeb0764053c |