https://github.com/comorebi-notes/ruby-spectrum
Ruby でスペクトル解析を行う実験リポジトリです
https://github.com/comorebi-notes/ruby-spectrum
Last synced: 5 months ago
JSON representation
Ruby でスペクトル解析を行う実験リポジトリです
- Host: GitHub
- URL: https://github.com/comorebi-notes/ruby-spectrum
- Owner: comorebi-notes
- Created: 2020-07-14T07:58:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-03T16:03:52.000Z (over 4 years ago)
- Last Synced: 2024-10-18T19:29:55.345Z (over 1 year ago)
- Language: Ruby
- Size: 52.8 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ruby-spectrum
Ruby でスペクトル解析を行う実験リポジトリです
## Requirement
```bash
$ brew install flac sox chromaprint
$ brew install gnuplot
$ gem install open3
$ gem install ruby-sox
$ gem intall numo-narray
$ gem install numo-fftw
```
#### fftw3
http://www.fftw.org/download.html
```bash
$ tar xvf fftw-3.3.8.tar.gz
$ cd fftw-3.3.8/
$ ./configure
$ make
$ sudo make install
```
## Example
### sample_01.rb
```bash
$ sample_01.rb lib/files/sample01.wav
```
音源に対して波形を描画します (横軸:時間 / 縦軸:大きさ)

### sample_02.rb
```bash
$ sample_02.rb lib/files/sample02.wav
```
音源に対してスペクトル解析した結果を描画します (横軸:周波数 / 縦軸:大きさ)

### sample_03.rb
```bash
$ sample_03.rb lib/files/sample03.wav
```
音源に対してスペクトル解析した動画を生成します (横軸:周波数 / 縦軸:大きさ)

#### 動画
https://twitter.com/kero_BIRUGE/status/1282946252703817728