JOCLoudness 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 233b016a7113d6d0d79533b247d6962922467c1a
4
- data.tar.gz: 3aae6b46fdf8eb78b818b3318fd9a46562d5f9d1
3
+ metadata.gz: 70c06a0cf74b5717a783f385af081385f7bf95ef
4
+ data.tar.gz: 26cb1be5891ff54a3f3445d6c0a5d2fe27cd668c
5
5
  SHA512:
6
- metadata.gz: afa516ea690e777fff9c5bef87bae79fddf1750022f5c4bc42135cbec06152d6784f510349bf6b9f54c6d3dbfeb92c959f15e6b87a6180338cf50f84d654822e
7
- data.tar.gz: af9f65f0f1ae9df978eadf8acfb4aba34c2d9c1fcada4418a87df2624608c47e1f3c19491358a34e6625ecbe9d3828f557f561ce3cfe2a4f888e4e8e441b59dc
6
+ metadata.gz: 52d59b4628a720eb3b943b45f4c76b09d045bfddb650de0a1c7f029981e80909d041ff30ea75ba2650fd798e183ceea1abd44792229e293e4228edfb067acdc2
7
+ data.tar.gz: 7131eb87e6101ece6f4f60acd452ce954a4cdcbab4699f73d86f951f2e17a890941a062c23526959fc408d73123ac731dd11897262f878ec860a956078f5ee80
@@ -1,9 +1,8 @@
1
1
  #file: IIRFilter.rb
2
2
 
3
-
4
- class IIRFilter
5
-
6
- # Ini obj
3
+ #IIR filter
4
+ class IIRFilter
5
+
7
6
  def initialize(order)
8
7
  @OldSamples = nil
9
8
  @ACoefs= nil
@@ -3,9 +3,10 @@ require_relative './RlbFilter/RLBFilter.rb'
3
3
  require_relative './PreFilter/PREFilter.rb'
4
4
  require_relative './Mean/MeanFast.rb'
5
5
 
6
+ #Loudness computation class (Based on ITU-R BS.1770)
6
7
  class JOCLoud
7
8
 
8
- # Ini obj
9
+ # Constructor
9
10
  def initialize
10
11
  @logger = nil
11
12
 
@@ -24,11 +25,14 @@ class JOCLoud
24
25
  @iscomputingLKFS = false
25
26
  end
26
27
 
27
- #Set logger
28
+ # Set logger (optional)
28
29
  def Setlogger(logger)
29
30
  @logger = logger
30
31
  end
31
32
 
33
+ # Initialize class
34
+ # @param fs [int] the sampling frecuency of wav file. It's used to compute the properly filter coeficients.
35
+ # @param nchannels [int] the number of audio channels of wav file.
32
36
  def ini(fs, nchannels)
33
37
 
34
38
  @fs = fs
@@ -67,6 +71,8 @@ class JOCLoud
67
71
  Log(Logger::DEBUG,"Endini")
68
72
  end
69
73
 
74
+ # Set audio channels weights (optional). The default channel weights for loudness computation are [1.0, 1.0, 1.0, 1.41, 1.41, 0, 0, 0] (lineal)
75
+ # @param channelweights [Array]
70
76
  def SetChannelWeigths(channelweights)
71
77
 
72
78
  if (@iscomputingLKFS == true)
@@ -108,6 +114,8 @@ class JOCLoud
108
114
  end
109
115
  end
110
116
 
117
+ # Returns the loudness of the wav file
118
+ # @return [Float] the resulting loudness in LKFS
111
119
  def GetLoudnessLKFS
112
120
  meanvals = Array.new
113
121
  nc = 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: JOCLoudness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Cenzano