# bpm
[![GoDoc](https://godoc.org/github.com/benjojo/bpm?status.svg)](https://godoc.org/github.com/benjojo/bpm)
Library and tool for dealing with beats per second detection in Go
This is a direct port of Mark Hills [bpm-tools](http://www.pogo.org.uk/~mark/bpm-tools/).
For that reason, it is also under the same licence as that utility, ( GPLv2 ).
You can use this version as a libary too, In testing you may find it produces slightly
different results than bpm-tools. This is because both tools use a random float on mid
point selection, Ideally it would use a static one, but I won't replicate drand exactly
to just get 1:1 matching with the offical tools.
## Usage of the command line util
You need to feed the command line utility PCM 32 bit little edian floats (mono), there are
two easy ways to do this:
Sox:
```
sox "$FILE" -r 44100 -e float -c 1 -t raw - | ./cmd /dev/stdin
```
ffmpeg:
```
ffmpeg -v quiet -i 1479012090.ts -f f32le -ac 1 -c:a pcm_f32le -ar 44100 pipe:1 | ./cmd /dev/stdin
```
You can also ask for a "snapshot" per second of the BPM calculated, using progressive mode:
```
$ ffmpeg -v quiet -i 1479012090.ts -f f32le -ac 1 -c:a pcm_f32le -ar 44100 pipe:1 | ./cmd -progressive=true /dev/stdin
179.020979
193.086109
191.044776
```
The first value is the BPM for the first 10 seconds, the 2nd for 10-20 seconds, 3rd is the 20-30th (and more until you stop
giving it data)
处理每秒节拍检测的 库和工具_go_代码_下载
版权申诉
160 浏览量
2022-06-16
11:47:24
上传
评论
收藏 11KB ZIP 举报
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
最新资源
- 知识蒸馏-基于Pytorch通过匹配训练轨迹进行数据集蒸馏-附项目源码+流程教程-优质项目实战.zip
- 儿童节 python庆祝代码简要介绍-20240601.docx
- 知识蒸馏-基于Pytorch实现的语义分割结构化知识蒸馏算法-附项目源码+流程教程-优质项目实战.zip
- 小白物联网智能家居毕设参考STM32+ESP8266/MQTT+OneNet+UniApp
- BeanUtil.java,对象属性拷贝工具
- 糖尿病肾病检测数据集VOC+YOLO格式4122张5类别.7z
- win10/11 更新禁用/开启
- IMG_3534.CR2.cr2
- FileZilla客户端
- 删除win10/11安全中心
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈