audio_analysis 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/audio_analysis.rb +13 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4159bea00fd1205a90744b10c3d5075f139af032483239c667db67af8da086d1
4
- data.tar.gz: 057f3a9d2d6491c4f170ef88aea5b1efc4e8eb0f14b5f93319a5140a6aa0328a
3
+ metadata.gz: 7c6ee2bf1738a0fefba9106383ac99014910171a22d0e34f86b72a201a3d3ae5
4
+ data.tar.gz: e5d37d7b4215d3772ce5c46b35e3424134bcdf1f6cf59896eb0380364a7031f0
5
5
  SHA512:
6
- metadata.gz: e5bdc1ef1531bdf30ac1b4b9bfdad306da0f6a0b30099f45fea5fd1a646a560c23900689a0a0ff639846db859844d7552e786107ed3c0ed6cfb0bb766f27c983
7
- data.tar.gz: 89ea15c38010cb2b8ae3b95df8ee284c662e1707a58c73f0c927efd4724bc5dd26356d0000be3629f759eefadbf459000642facadd6b761a0e4f44b0be7f792c
6
+ metadata.gz: fce4fab5dc03e927721825c46999cb0d1e181ad4cd82086d917a69aeb577ce491bbaf4c3310d9849d8665c581059a355e3746ba3095a23b438489da233f3ec56
7
+ data.tar.gz: 3494f50f35eb17713fc752760a3625d58bdb0d48a94e350a3bfbc1cc939f667da73c4b0ac45fa02f37841371d5ab7e93d4486e721fbbdb2ccdaaf6a9dcef1f11
@@ -1,19 +1,25 @@
1
1
  class AudioAnalysis
2
2
  def self.find_bpm(file_path)
3
- `pip install -r lib/python_analysis/requirements.txt`
4
- bpm = `python3 lib/python_analysis/bpm_analysis.py #{file_path}`
3
+ `pip install -r #{gem_path}/lib/python_analysis/requirements.txt`
4
+ bpm = `python3 #{gem_path}/lib/python_analysis/bpm_analysis.py #{file_path}`
5
5
  bpm.to_f
6
6
  end
7
7
 
8
8
  def self.find_key(file_path)
9
- `pip install -r lib/python_analysis/requirements.txt`
10
- `python3 lib/python_analysis/key_analysis.py #{file_path}`
9
+ `pip install -r #{gem_path}/lib/python_analysis/requirements.txt`
10
+ `python3 #{gem_path}/lib/python_analysis/key_analysis.py #{file_path}`
11
11
  end
12
12
 
13
13
  def self.analyze(file_path)
14
- `pip install -r lib/python_analysis/requirements.txt`
15
- bpm = `python3 lib/python_analysis/bpm_analysis.py #{file_path}`
16
- key =`python3 lib/python_analysis/key_analysis.py #{file_path}`
14
+ `pip install -r #{gem_path}/lib/python_analysis/requirements.txt`
15
+ bpm = `python3 #{gem_path}/lib/python_analysis/bpm_analysis.py #{file_path}`
16
+ key =`python3 #{gem_path}/lib/python_analysis/key_analysis.py #{file_path}`
17
17
  { bpm: bpm, key: key }
18
18
  end
19
+
20
+ private
21
+
22
+ def self.gem_path
23
+ Gem.datadir("audio_analysis")
24
+ end
19
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audio_analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Indigo Tech Tutorials '