hypnosound 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hypnosound",
3
3
  "type": "module",
4
- "version": "1.6.1",
4
+ "version": "1.7.1",
5
5
  "description": "A small library for analyzing audio",
6
6
  "main": "index.js",
7
7
  "scripts": {
package/src/audio/bass.js CHANGED
@@ -5,8 +5,8 @@ export default function bass(fft) {
5
5
  }
6
6
 
7
7
  function calculateBassPower(fft, sampleRate, totalSamples) {
8
- const lowerBound = 20 // 20 Hz
9
- const upperBound = 160 // 160 Hz
8
+ const lowerBound = 0
9
+ const upperBound = 400
10
10
  let bassEnergy = 0
11
11
  let maxEnergy = 0
12
12
 
@@ -188,7 +188,7 @@ export function makeCalculateStats(historySize = 500) {
188
188
  let zScore = variance ? (value - mean) / Math.sqrt(variance) : 0
189
189
  return {
190
190
  current: value,
191
- zScore: normalizeZScore(zScore),
191
+ zScore: zScore / 2.5,
192
192
  normalized,
193
193
  standardDeviation: Math.sqrt(variance),
194
194
  median,