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 Distribution
loristrck-1.5.7.tar.gz
(842.7 kB
view hashes)
Built Distributions
Close
Hashes for loristrck-1.5.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740c3fec03bca38db676ed4ae16ef1ce4e1f7755c54e3199b53eb35ae6e5da7b |
|
MD5 | f6c957a9e69f68121bc96f2ada1c008a |
|
BLAKE2b-256 | fbd80a671d829c93120fc29f2dcd8c90bc2c54adba73a69d3f0425744ecc3162 |
Close
Hashes for loristrck-1.5.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4532ae23d45e31962170281bd1688914857666495e178576d0a2cbc728702c |
|
MD5 | 55d92d72f15b976e32e326cc3be139a1 |
|
BLAKE2b-256 | 2c2e2b3b83c4ad134217da575eea703c58a191e40b8b14fba4c82ab473e8847d |
Close
Hashes for loristrck-1.5.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 237df4de1e975d438cf2cf7ba4eb9112903b76f6ba9184be05ed1b30a2ad2347 |
|
MD5 | 856b02b0f8cb8e6943bf618cfb17697b |
|
BLAKE2b-256 | f4c4c705a4f5a4fed36b70a14b5bc43767abbdef1075292263fa32c66cec11cd |
Close
Hashes for loristrck-1.5.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91a1b895d45f3b50f473a9a2b98b1aeb04dc7e6c2762e193ed41bb454557fe58 |
|
MD5 | f359f5c5e4a9c9e5203cdbd3da0efaad |
|
BLAKE2b-256 | 858cfcd977545f78bbda03eb9acd12f1201b2846b668e1a6ea8d7675d0db2b05 |
Close
Hashes for loristrck-1.5.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba4439ead1210d7e9bf6f6d7ee84acbad2a3e89f0f217fe2173c59253ea20e06 |
|
MD5 | cd7553c94fd6c60e49fbf99eb25ce742 |
|
BLAKE2b-256 | 6858ba89ff29ebce15cb6cb731d51824123f09ffc5c0960645ef379c9abe3d23 |
Close
Hashes for loristrck-1.5.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5500d67a9ec44ad690e77c465beb0c6c20dafbe3b421314599daddeb360b5367 |
|
MD5 | b6a66757e3d6e9b1f2f961611d62ac9d |
|
BLAKE2b-256 | 8dac18b9603a10860700de747a951843db58420506cd890a5b05c834e0fded2e |
Close
Hashes for loristrck-1.5.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f457c7e895d1a7c7e83a0ff154e04698cd4f1b95edbcc8bcdc1e7b87c7d7d490 |
|
MD5 | 1a4a3a0936166f84c821808b488c618b |
|
BLAKE2b-256 | 4f713133b900fe67ec672d7f6fa10a7f0cad80608d871f16d642b9ce8af04e0a |
Close
Hashes for loristrck-1.5.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 767aa7b14c5aae6320e3f87b07d82ad6d1efec83e25c3d5aed00bfb819b867d5 |
|
MD5 | a4c90b908d9ae2c866181d9b52caf5de |
|
BLAKE2b-256 | 69e381d1c95bf46a35a82d0c60dd0c84af6bc7026c22648fe175b92aefa0f9f2 |
Close
Hashes for loristrck-1.5.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e80d1e847a389df5f0efb4538d29bb8fbb5b4728fa27f693833b6a18ca08c6 |
|
MD5 | 92461dafedfdd16e626dbb4d24cad2e4 |
|
BLAKE2b-256 | ee95288a86c35a2d1a2febd4f687ff8facf537df837bbed0f1d6c5526ebbedf3 |
Close
Hashes for loristrck-1.5.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2398b2010e7ce86e8c5d96ea61e262303aef480e286ea19b5a11ba884db4e7a7 |
|
MD5 | cfc171681027523a2378e3eb5b21f8c3 |
|
BLAKE2b-256 | 71517283592b8de0c9a8dcc761482bd60ec53e422f0a98f8cb609d3e9ed20a2e |
Close
Hashes for loristrck-1.5.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd43729f0a3bc0ea41962a6a76216f5481e647b97484daaa42a54a4f5282644e |
|
MD5 | 2465ac9d023f38fce095fd98316ced2e |
|
BLAKE2b-256 | 8d297163e0d6da1f9e29a3aed82b6ed10538abdca88937a829e969e15fd0633d |
Close
Hashes for loristrck-1.5.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41844fbc85b41230d490dce66a52914163b6dc0df348f7da1fb337874886a8c1 |
|
MD5 | 56acb84adc4734752a9914c2fdb903b0 |
|
BLAKE2b-256 | 74b98a7b59a687a993380935eee2965c72ba318778606f885e03892309dbdf08 |