Skip to main content

Easy CLI for modifying the speed and pitch of audio

Project description

Nightcore - Easily modify speed/pitch

A small and focused CLI for changing the pitch and speed of audio files.

I had the idea for this a long time ago, and wanted to make it to prove a point. This program is not intended for, nor should it be used for, copyright infringement and piracy. Nightcore is not, and has never been, fair use.

Installation

FFmpeg is a required dependency - see here for instructions on how to set it up!

With FFmpeg installed, you can use pip to install nightcore (although pipx is recommended)

pip install nightcore

Building from source

nightcore is built using Poetry.

$ git clone https://github.com/SeparateRecords/nightcore
$ poetry install
$ poetry build

Usage

The CLI is easy to use, and behaves as you would expect.

# Show the help menu
$ nightcore --help

# By default it will increase the pitch by 2 semitones.
$ nightcore music.mp3 > out.mp3

# Specify pitch increase/decrease
$ nightcore music.mp3 +3 > out.mp3

# The above command is equivalent to the following:
$ nightcore music.mp3 +3 semitones > out.mp3

# Supports other types of speed-change out of the box
$ nightcore music.mp3 +3 tones > out.mp3

# Speed up by a percentage (150 percent => 1.5x speed)
$ nightcore music.mp3 150 percent > out.mp3

# Slowing down the music works as expected, too
$ nightcore music.mp3 -3 > out.mp3

# The `--output <file>` option can be used instead of redirection
$ nightcore music.mp3 --output out.mp3

# Set the extension manually with `--format <fmt>`
$ nightcore badly_named_file --format mp3 > out.mp3

# By default, the output file is equalized to counteract a pitch increase
# To disable the automatic equalization, pass the `--no-eq` flag
$ nightcore music.mp3 --no-eq > out.mp3

Project details


Download files

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

Source Distribution

nightcore-0.5.5.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

nightcore-0.5.5-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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