Skip to content

Commit

Permalink
Fix name for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
gregogiudici committed Sep 19, 2024
1 parent 4c96926 commit db86661
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15...3.26)

project(pystretch LANGUAGES CXX)
project(python_stretch LANGUAGES CXX)

if (NOT SKBUILD)
message(WARNING "
Expand Down Expand Up @@ -66,5 +66,6 @@ nanobind_add_module(
src/signalsmith-bindings.cpp
)


# Install directive for scikit-build-core
install(TARGETS Signalsmith LIBRARY DESTINATION pystretch)
install(TARGETS Signalsmith LIBRARY DESTINATION python_stretch)
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pystretch: pitch shifting and time stretching
# python-stretch: pitch shifting and time stretching
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/gregogiudici/python-stretch/blob/main/LICENSE)
[![Supported Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Windows%20%7C%20Linux-green)](https://pypi.org/project/python-stretch)
[![Pip Action Status][actions-pip-badge]][actions-pip-link]
Expand All @@ -24,7 +24,7 @@ A simple Python Wrapper of the Signalsmith Stretch C++ library for pitch and tim

## Installation

`pystretch` is available via PyPI (via [Platform Wheels](https://packaging.python.org/guides/distributing-packages-using-setuptools/#platform-wheels)):
`python-stretch` is available via PyPI (via [Platform Wheels](https://packaging.python.org/guides/distributing-packages-using-setuptools/#platform-wheels)):
```
pip install python-stretch
```
Expand All @@ -41,7 +41,7 @@ pip install ./python-stretch
```
import numpy as np
import librosa
import pystretch
import python_stretch as ps
# Load an audio example from librosa (e.g., 'trumpet', 'brahms',...)
audio, sr = librosa.load(librosa.ex('trumpet'), sr=None)
Expand All @@ -51,16 +51,16 @@ if (audio.shape == 1):
audio = audio[np.newaxis, :]
# Create a Stretch object
ps = pystretch.Signalsmith.Stretch()
s = ps.Signalsmith.Stretch()
# Configure using a preset
ps.preset(audio.shape(0), sr) # numChannels, sampleRate
s.preset(audio.shape(0), sr) # numChannels, sampleRate
# Shift pitch 1 octave up
ps.setTransposeSemitones(12)
s.setTransposeSemitones(12)
# Double audio duration
ps.timeFactor = 0.5
s.timeFactor = 0.5
# Process
audio_processed = ps.process(audio)
audio_processed = s.process(audio)
# Save and listen
import soundfile as sf
Expand Down
2 changes: 1 addition & 1 deletion examples/library_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"import librosa\n",
"import IPython.display as ipd\n",
"\n",
"import pystretch\n",
"import python_stretch as pystretch\n",
"import pedalboard"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/test_timeit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import timeit
import pystretch
import python_stretch as pystretch
import librosa

def test_1():
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers = [
[project.urls]
Homepage = "https://github.com/gregogiudici/python-stretch"


[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.4"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_pystretch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pystretch as m
import python_stretch as m
import numpy as np

def test_double_length():
Expand Down

0 comments on commit db86661

Please sign in to comment.