计算机辅助节奏分析工具箱
carat的Python项目详细描述
克拉
_ _ __ _ _|_ (_ (_| | (_| |_ computer-aided rhythm analysis toolbox
文件
有关完整的参考手册和入门教程,请参见https://carat.readthedocs.io。
演示笔记本
你可以用克拉做的一些演示:
- Rhythmic patterns demo notebook:如何从录音中提取节奏模式。
安装
pypi上提供了最新的稳定版本,您可以通过
pip install carat
要从源代码构建克拉,请使用python setup.py build
。
然后,要安装carat,请说python setup.py install
。
如果一切顺利,您应该能够在examples/
下执行演示脚本。
(OSX用户应遵循下面给出的安装指南)。
或者,您可以下载或克隆存储库并使用pip
处理依赖项:
unzip carat.zip
pip install -e carat
或
git clone https://github.com/mrocamora/carat.git
pip install -e carat
通过调用pip list
,您将看到carat
现在是一个已安装的包:
carat (0.x.x, /path/to/carat)
安装提示
carat
使用librosa
加载音频文件。以下是librosa提供的安装提示,以便安装加载音频文件所需的依赖项。
librosa
使用soundfile
和audioread
加载音频文件。
请注意,soundfile
当前不支持MP3,这将导致librosa
回到audioread
库。
声音文件
如果在Linux环境中使用pip
,则可能需要安装libsndfile
手动操作详情请参阅SoundFile installation documentation。
支持音频读取和MP3
为了给audioread
提供更多的音频解码能力(例如,用于读取MP3文件),
您可能需要安装ffmpeg或gstreamer。
请注意,在某些平台上,audioread
至少需要其中一个程序才能正常工作
以下是针对不同操作系统的一些常用命令:
- Linux(apt-get):
apt-get install ffmpeg
或apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
- Linux(百胜):
yum install ffmpeg
或yum install gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly
- mac:
brew install ffmpeg
或brew install gstreamer
- Windows:从网站下载二进制文件
对于gstreamer,还需要使用
pip install pygobject
引用
如果您想引用克拉,请引用AAWM 2019发表的论文:
Rocamora, and Jure. "carat: Computer-Aided Rhythmic Analysis Toolbox." In Proceedings of Analytical Approaches to World Music. 2019.