Metadata-Version: 2.4
Name: audio8bit
Version: 0.0.0
Summary: Turn a song into an 8-bit / chiptune arrangement of its melody (vocal or instrumental)
Author: Olya Pimenova
License: Copyright (c) 2026 Olya Pimenova
        
        This software is free to use for NONCOMMERCIAL purposes under the PolyForm
        Noncommercial License 1.0.0, reproduced in full below. COMMERCIAL USE REQUIRES
        A SEPARATE, PAID LICENSE FROM THE AUTHOR — please contact the copyright holder
        to arrange one.
        
        Required Notice: Copyright (c) 2026 Olya Pimenova
        
        --------------------------------------------------------------------------------
        
        # PolyForm Noncommercial License 1.0.0
        
        <https://polyformproject.org/licenses/noncommercial/1.0.0>
        
        ## Acceptance
        
        In order to get any license under these terms, you must agree
        to them as both strict obligations and conditions to all
        your licenses.
        
        ## Copyright License
        
        The licensor grants you a copyright license for the
        software to do everything you might do with the software
        that would otherwise infringe the licensor's copyright
        in it for any permitted purpose.  However, you may
        only distribute the software according to [Distribution
        License](#distribution-license) and make changes or new works
        based on the software according to [Changes and New Works
        License](#changes-and-new-works-license).
        
        ## Distribution License
        
        The licensor grants you an additional copyright license
        to distribute copies of the software.  Your license
        to distribute covers distributing the software with
        changes and new works permitted by [Changes and New Works
        License](#changes-and-new-works-license).
        
        ## Notices
        
        You must ensure that anyone who gets a copy of any part of
        the software from you also gets a copy of these terms or the
        URL for them above, as well as copies of any plain-text lines
        beginning with `Required Notice:` that the licensor provided
        with the software.  For example, if you make a change covered
        by [Changes and New Works License](#changes-and-new-works-license)
        and provide that change to someone else, you must include the
        notices with that change.
        
        ## Changes and New Works License
        
        The licensor grants you an additional copyright license to
        make changes and new works based on the software for any
        permitted purpose.
        
        ## Patent License
        
        The licensor grants you a patent license for the software that
        covers patent claims the licensor can license, or becomes able
        to license, that you would infringe by using the software.
        
        ## Noncommercial Purposes
        
        Any noncommercial purpose is a permitted purpose.
        
        ## Personal Uses
        
        Personal use for research, experiment, and testing for
        the benefit of public knowledge, personal study, private
        entertainment, hobby projects, amateur pursuits, or religious
        observance, without any anticipated commercial application,
        is use for a permitted purpose.
        
        ## Noncommercial Organizations
        
        Use by any charitable organization, educational institution,
        public research organization, public safety or health
        organization, environmental protection organization,
        or government institution is use for a permitted purpose
        regardless of the source of funding or obligations resulting
        from the funding.
        
        ## Fair Use
        
        You may have "fair use" rights for the software under the
        law. These terms do not limit them.
        
        ## No Other Rights
        
        These terms do not allow you to sublicense or transfer any of
        your licenses to anyone else, or prevent the licensor from
        granting licenses to anyone else.  These terms do not imply
        any other licenses.
        
        ## Patent Defense
        
        If you make any written claim that the software infringes or
        contributes to infringement of any patent, your patent license
        for the software granted under these terms ends immediately. If
        your company makes such a claim, your patent license ends
        immediately for work on behalf of your company.
        
        ## Violations
        
        The first time you are notified in writing that you have
        violated any of these terms, or done anything with the software
        not covered by your licenses, your licenses can nonetheless
        continue if you come into full compliance with these terms,
        and take practical steps to correct past violations, within
        32 days of receiving notice.  Otherwise, all your licenses
        end immediately.
        
        ## No Liability
        
        ***As far as the law allows, the software comes as is, without
        any warranty or condition, and the licensor will not be liable
        to you for any damages arising out of these terms or the use
        or nature of the software, under any kind of legal claim.***
        
        ## Definitions
        
        The **licensor** is the individual or entity offering these
        terms, and the **software** is the software the licensor makes
        available under these terms.
        
        **You** refers to the individual or entity agreeing to these
        terms.
        
        **Your company** is any legal entity, sole proprietorship,
        or other kind of organization that you work for, plus all
        organizations that have control over, are under the control of,
        or are under common control with that organization.  **Control**
        means ownership of substantially all the assets of an entity,
        or the power to direct its management and policies by vote,
        contract, or otherwise.  Control can be direct or indirect.
        
        **Your licenses** are all the licenses granted to you for the
        software under these terms.
        
        **Use** means anything you do with the software requiring one
        of your licenses.
        
Keywords: audio,8bit,chiptune,melody,transcription,cli,dsp,ffmpeg
Classifier: Environment :: Console
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: demucs>=4.0
Requires-Dist: librosa>=0.10
Requires-Dist: basic-pitch>=0.4
Dynamic: license-file

# audio8bit

[![CI](https://github.com/yumiaura/audio8bit/actions/workflows/ci.yml/badge.svg)](https://github.com/yumiaura/audio8bit/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/audio8bit.svg)](https://pypi.org/project/audio8bit/)
[![Downloads](https://img.shields.io/pypi/dm/audio8bit.svg)](https://pypi.org/project/audio8bit/)
[![Python](https://img.shields.io/pypi/pyversions/audio8bit.svg)](https://pypi.org/project/audio8bit/)

Turn any song into 8-bit, video-game-style music - right from your terminal.
audio8bit finds the song's melody (and its chords) and replays them with retro
"chiptune" sounds, like an old game console.

**[English](https://github.com/yumiaura/audio8bit/blob/main/README.md)** | [Español](https://github.com/yumiaura/audio8bit/blob/main/docs/README_ES.md) | [Português](https://github.com/yumiaura/audio8bit/blob/main/docs/README_PT.md) | [Français](https://github.com/yumiaura/audio8bit/blob/main/docs/README_FR.md) | [Deutsch](https://github.com/yumiaura/audio8bit/blob/main/docs/README_DE.md) | [Italiano](https://github.com/yumiaura/audio8bit/blob/main/docs/README_IT.md) | [Русский](https://github.com/yumiaura/audio8bit/blob/main/docs/README_RU.md) | [中文](https://github.com/yumiaura/audio8bit/blob/main/docs/README_ZH.md) | [日本語](https://github.com/yumiaura/audio8bit/blob/main/docs/README_JA.md) | [हिन्दी](https://github.com/yumiaura/audio8bit/blob/main/docs/README_HI.md) | [한국어](https://github.com/yumiaura/audio8bit/blob/main/docs/README_KR.md)

## What it does

- Give it a song, get back a chiptune version of it.
- Works whether the song has **singing** or is **instrumental** - it picks the
  tune automatically.
- Everything runs on your own computer; nothing is uploaded.

## Before you start

You need two things:

- **Python 3.9 or newer**
- **ffmpeg** - a free tool for reading and writing audio. Install it with
  `sudo apt install ffmpeg` (Linux) or `brew install ffmpeg` (macOS).

## Install

```bash
pip install audio8bit
```

> **First run is slow:** it downloads a small AI model (about 80 MB) and can
> take a few minutes. That's normal - later runs are faster.

## Use it

```bash
audio8bit -i song.mp3
```

This creates `output.mp3` in the current folder. That's it. Each run also
prints a short quality report so you can see the result came out clean.

Want something different? Here are the most common tweaks:

```bash
audio8bit -i song.mp3 -V lead          # just the main melody, no chords
audio8bit -i song.mp3 -s vocals        # follow the singing
audio8bit -i song.mp3 -s instrumental  # follow the instruments
audio8bit -i song.mp3 --transpose 5    # play it 5 semitones higher
audio8bit -i song.mp3 -f ogg           # save as .ogg instead of .mp3
```

## All options

| Option           | Default          | What it does                                  |
| ---------------- | ---------------- | --------------------------------------------- |
| `-i, --input`    | required         | The song to convert (mp3, wav, flac, ...)       |
| `-o, --output`   | `output.<type>`  | Where to save the result                      |
| `-f, --format`   | same as input    | Save as a different type, e.g. `ogg`, `wav`   |
| `-s, --source`   | `auto`           | Where to take the tune: `vocals`, `instrumental`, or `auto` |
| `-m, --method`   | `transcribe`     | How notes are found: `transcribe` (best) or `pitch` (faster, lighter) |
| `-V, --voices`   | `chords`         | `chords` (with harmony) or `lead` (one melody line) |
| `--transpose`    | `0`              | Shift the key, in semitones (e.g. `5` up, `-5` down) |
| `--bits`         | `8`              | Sound resolution, 1-8 (lower = crunchier)     |
| `--rate`         | `22050`          | Sample rate in Hz (lower = more retro)        |
| `--duty`         | `0.25`           | Tone colour of the pulse wave, 0-1            |

## If something goes wrong

- **"ffmpeg not found"** - install ffmpeg (see *Before you start*).
- **The first run seems stuck** - it's downloading the AI model; give it a few
  minutes. It only happens once.
- **It doesn't sound like the song** - try `-s vocals` or `-s instrumental` to
  pick the right part, or `-V lead` for just the melody.

## How it works (optional reading)

1. Splits the song into parts (vocals, drums, bass, and the rest).
2. Detects the actual notes being played in the part you chose.
3. Replays those notes with simple 8-bit "chip" sounds and saves the file.

## License

[Noncommercial](https://github.com/yumiaura/audio8bit/blob/main/LICENSE)
