Metadata-Version: 2.1
Name: putao
Version: 0.0.1a0
Summary: 葡萄 (putao, grape): Poor man's UTAU.
Home-page: https://github.com/ongyx/putao
License: UNKNOWN
Author: Ong Yong Xin
Author-email: ongyongxin2020+github@gmail.com
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: mido>=1.2.9
Requires-Dist: numpy>=1.20.1
Requires-Dist: SoundFile>=0.10.3.post1
Requires-Dist: sox>=1.4.1

# 葡萄 (putao, grape): Poor man's UTAU

putao is a Python module that allows programmatic creation, editing, and saving of UTAU-style songs.

No more having to wrestle with encoding issues: all filenames use plain ASCII romanization of Japanese syllables!

Inspired by [Composite's](https://www.youtube.com/c/Composite1618) [Bad Apple](https://github.com/Composite1618/CompositeMemes/blob/main/bad%20apple.py) script.

## Why name it putao?

Because python + utau = putao. Conincidentally, it means 'grape' in Chinese.

## How it works

putao uses voicebanks, like a normal voice synthesizer.
A voicebank is a regular folder with wav files, and a `putao.json` config file that maps those wavs to syllables.

The syllables are then pitched using [scientific pitch notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation) and streched according to a duration.
The result of this is a lyric. The lyrics can then be joined into a song.

See the [examples](./examples) folder for what a voicebank should look like.

## Making a song

Currently, the only way to do this is to use a special markup:

```
(syllable)<(note),(duration)>
```

`syllable`: alphanumerical name of syllable to sing (without spacing)

`note`: what pitch to sing the syllable at in the format `(key)(octave)`
where key must be one of `c c# d d# e f f# g g# a bb b`, and octave is an integer.
The key may be upper or lowercase.

`duration`: how long to hold the note for as an int/float

i.e

```
A<c4,0.1>
```

## Todo

- Add midi support
- GUI, like UTAU
- Project-like import/export

## Install

```
pip install putao
```

On Linux, you may have to install your distro's equivelent of the packages `libsndfile1` and `sox`.
i.e Debian:

```
sudo apt install libsndfile1 sox
```

## License

MIT.

