Read and write deepvocal dv file
Project description
dvfile-python
介绍
操作deepvocal dv文件的python库。
本python库依赖numpy
由于dv文件为二进制文件,且没有官方文档或解析器,本项目无法保证与deepvocal完美兼容,如遇到文件解析错误欢迎在issue中提出。
安装
pip install dvfile
功能
dv文件
-
解析与保存dv文件
目前可以解析的内容:
- 曲速标记:位置、曲速
- 节拍标记:位置、每小节拍数、音符分数
- 音轨属性:音轨名、音轨音量、独奏、静音、双声道平衡
- 区段属性:区段名、区段音源名、起点、长度
- 音符属性:起点、长度、音高、歌词汉字、歌词拼音、滑音(弯曲深度、弯曲长度、头部滑音长度、尾部滑音长度)、颤音(颤音长度、颤音幅度、颤音速度、渲染出的颤音曲线)
- 伴奏音轨:音轨名、音轨音量、独奏、静音、文件名、起点
- 区段参数:音量、音调、气声、声线
目前不能解析的内容(保存时将还原默认值):
- 音符属性:音素
-
导入、导出ust、nn文件(需要utaufile)
-
导入、导出mid文件(需要mido)
-
批量获取歌词
-
量化(将音符对齐到节拍线)
-
移调(音符与pit批量上下移动)
-
自动修复工程(删除区段两端的无效音符和无效参数,音符按开始时间排序,修复音符重叠)
示例
import dvfile as df
#打开dv文件
d=df.opendv("myproject.dv")
#导出mid文件(需要mido)
d.to_midi_file().save("myproject.mid")
#每个音轨单独导出ust文件
for (i,t) in enumerate(d.track):
t.to_ust_file().save('myproject{}.ust'.format(i))
#每个音轨单独导出nn文件(需要utaufile)
for (i,t) in enumerate(d.track):
t.to_nn_file().save('myproject{}.nn'.format(i))
#导出五线谱(需要music21和musescore)
d.to_music21_score().show()
#获取第0音轨第0区段的歌词(拼音与汉字)列表
tr=d.track[0]
seg=tr.segment[0]
pinyin=seg.getlyric()
hanzi=seg.getlyric(use_hanzi=True)
#将第0音轨的所有区段合并
tr.segment=[sum(tr.segment)]
#工程整体降低3key
d.transpose(-3)
#保存dv文件
d.save("myproject2.dv")
#打开dvtb文件
dt=df.opendvtb("myvoicebank.dvtb")
参与贡献
- Fork 本仓库
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request
相关链接
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dvfile-0.2.0.tar.gz.
File metadata
- Download URL: dvfile-0.2.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6e949cc0463e45f99263d071efe53f63600d0cdae5c0ed664033188558bf37
|
|
| MD5 |
c7dd46866fc2a335d99e2696a0934380
|
|
| BLAKE2b-256 |
c0c67a7f5400e90871a05101b8946c875cfa8c8a0394fe2cb5f50c6e87cbadc5
|
File details
Details for the file dvfile-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: dvfile-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0512286536a03b92b18e452ea9dec94c883101968203aedd7bd22b192f439133
|
|
| MD5 |
75fa03495d1ee385e9b0be8eafc15d93
|
|
| BLAKE2b-256 |
4ef20088f9facfd1438b0cfe410fa69517a6b75c1673a26e0583554371c679db
|