# Hachiko [![PyPI](https://img.shields.io/pypi/v/hachiko-bapu?style=flat-square)](https://pypi.org/project/hachiko-bapu/) [![introduction](https://img.shields.io/badge/introduction-wiki-blue?style=flat-square)](https://github.com/duangsuse-valid-projects/Hachiko/wiki)
<div align="center">
<img alt="Hachiko" src="Hachiko.png"></img>
</div>
Simple tool for creating pitch timeline, this program divides midi creation into `pitches` and `timeline` part.
When creating timeline, press <kbd>A</kbd> to give position/duration information, and use <kbd>S</kbd> to split different notes directly when holding <kbd>A</kbd>
```python
# Twinkle Little Star
[45, 45, 52, 52, 54, 54, 52, 50, 50, 49, 49, 47, 47, 45, 52, 52, 50, 50, 49, 49, 47, 52, 52, 50, 50, 49, 49, 47, 45, 45, 52, 52, 54, 54, 52, 50, 50, 49, 49, 47, 47, 45]
```
> Tip: press <kbd>K</kbd> in pitch window, and input code in console (__it's recommended to launch this application in console__)
The name of the project is *Hachiko*, inspired by the golden yellow Akita dog - ハチ公, which is in homophonic with "扒公" (means melody extraction "耳 Copy" or "扒谱").
## Installing
~~There's no need for system-wide installation, just use the script `hachi.py`~~
Since version 1.1, setting up the installation using `setuptools` is required.
> For Windows installation guide, please read [this wiki](https://github.com/duangsuse-valid-projects/Hachiko/wiki/Windows-Installation)
```bash
python3 setup.py install # can be --user or sudo
```
or get it from PyPI:
```bash
pip3 install hachiko-bapu
#v or, for the latest version
pip3 install --upgrade git+https://github.com/duangsuse-valid-projects/Hachiko
```
System library [FluidSynth](https://github.com/FluidSynth/fluidsynth) is required to run this application.
### Old installation-free version
See [release 1.0](https://github.com/duangsuse-valid-projects/Hachiko/releases/tag/v1.0), get a zip(or tar) and uncompress:
```bash
pip install --user -r requirements.txt
python3 hachi.py
# use midnotes.py to replace srt2mid.py print-notes
```
## UI Control / Basic Routine
Hachiko is self documented, so just use the program.
```bash
hachiko -h
```
> NOTE: For the first time using GUI, you can spend more time learning hot keys
Once `puzi.srt` is generated, you can use `srt2mid puzi.srt` to transform it into MIDI file
Btw, you can use pitches from extrenal tool (like [Synthesizer V Editor](https://synthesizerv.com/) or [MidiEditor](https://www.midieditor.org/)) extracted by `srt2mid print-notes puzi.mid` instead of built-in approach
Btw, there's also an option to use [MELODIA Algorithm](https://github.com/duangsuse-valid-projects/audio_to_midi_melodia) to extract pitches directly from music
## Tool `srt2mid` and `lrc_merge`
[srt2mid.py](hachiko/cli_tools/srt2mid.py) can be used to make conversation between SRT / MIDI File format
Output filename is determined automatically from input path, and SRT representation of MIDI track will be timeline of integer(note pitch)s.
The default mode, "from", means "from srt to mid", and when extracting lyrics from mid file you have to use "back-lyrics" instead.
```plain
Usage: srt2mid [ from/back/back-lyrics/print-notes ] files...
```
[lrc_merge.py](hachiko/cli_tools/lrc_merge.py) can be used to merge words-based lyrics into sentence-based lyrics
```plain
usage: lrc_merge [-h] [-dist n_sec] [-min-len n_sec] [-o name] [-sep word_seprator] (path / 'lrc')
```
+ `dist` max distance for words in same sentence, default `0.8`
+ `min-len` min duration for the last word in sentence (only when `lrc` input is used)
Execute `lrc_merge -h` to see full details
没有合适的资源?快使用搜索试试~ 我知道了~
用于创建音高时间线的简单工具_python_代码_下载
共21个文件
py:13个
sf2:2个
gitignore:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 199 浏览量
2022-06-16
17:03:44
上传
评论
收藏 133KB ZIP 举报
温馨提示
用于创建音高时间线的简单工具,该程序将 MIDI 创建分为pitches和timeline部分。 创建时间线时,按下A可提供位置/时长信息,S按住时可直接分割不同的音符A # Twinkle Little Star [45, 45, 52, 52, 54, 54, 52, 50, 50, 49, 49, 47, 47, 45, 52, 52, 50, 50, 49, 49, 47, 52, 52, 50, 50, 49, 49, 47, 45, 45, 52, 52, 54, 54, 52, 50, 50, 49, 49, 47, 47, 45] 提示:K在音高窗口中按,在控制台输入代码(建议在控制台启动此应用程序)
资源推荐
资源详情
资源评论
收起资源包目录
Hachiko-master.zip (21个子文件)
Hachiko-master
highpitch_instrument.sf2 3KB
.gitignore 2KB
README.md 4KB
hachiko_bapu
hachi.py 10KB
tkgui.py 27KB
synthesize.py 4KB
funutils.py 4KB
cli_tools
lrc_merge.py 4KB
srt2mid.py 4KB
__init__.py 35B
fluidsynth.h 937B
instrument.sf2 12KB
tkgui_utils.py 12KB
FluidSynth.py 2KB
hachi_groups.py 8KB
__init__.py 64B
hachitools.py 2KB
LICENSE 1KB
requirements.txt 45B
Hachiko.png 82KB
setup.py 2KB
共 21 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功