Skip to content

Commit

Permalink
Merge pull request #264 from pierreaubert/develop
Browse files Browse the repository at this point in the history
Merge Develop into Master before switch to Rust
  • Loading branch information
pierreaubert authored Feb 6, 2024
2 parents 804e214 + e64e37d commit 40293c0
Show file tree
Hide file tree
Showing 1,352 changed files with 179,848 additions and 2,217 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# /node_modules/* in the project root is ignored by default
/node_modules/*

# build artefacts
dist/*
build/*
coverage/*

# data definition files
**/*.d.ts

# 3rd party libs
/src/public/
23 changes: 11 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
module.exports = {
env: {
browser: true,
es2021: true
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
rules: {
}
}
env: {
browser: true,
es6: true,
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {},
};
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master debug ]
branches: [ master develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ develop ]
schedule:
- cron: '15 1 * * 4'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10.6
- name: Set up Python 3.10.12
uses: actions/setup-python@v3
with:
python-version: "3.10.6"
python-version: "3.10.12"
- run: which python
- run: pwd
- run: ls -la
Expand Down
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
.ipynb_checkpoints
Untitled*.ipynb
snippets*.ipynb
*~
#*#
.#*
*.bak
**/*~
**/#*.*#
**/.#*
**/*.bak
**/*.so
**/*_large.png
__pycache__
.idea
TAGS
.coverage
.idea
*_large.png
docs
tmp
extracted
Expand Down Expand Up @@ -40,12 +41,10 @@ cache.*.h5
*.log
*.csv
*.out
#generate_meta.py#
.vscode
.cache
.sass-cache
build
*.so
bin
coverage.xml
recompute_eqs.sh
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

16 changes: 15 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ repos:
rev: v1.0.5
hooks:
- id: csslint
- repo: https://github.com/astral-sh/ruff-pre-commit
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v8.53.0' # Use the sha / tag you want to point at
hooks:
- id: eslint
additional_dependencies:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v3.0.3' # Use the sha / tag you want to point at
hooks:
- id: prettier
types_or: [javascript]
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.1.8'
hooks:
Expand Down
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore artifacts:
build
dist
coverage
docs

# Ignore all HTML files:
*.html

.gitignore
.prettierignore
25 changes: 25 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
2023-11-12 pierre <[email protected]>

* tests/test_go.py: tests are not passing for mysterious reasons

* src/website/nav_simple.html: add logo back on mobile

* src/website/assets/similar.js: add support for radar plot

2023-11-11 pierre <[email protected]>

* src/website/assets/common.js: split title over 2 lines if too long
; got the grid back

* src/website/speaker_desc.html: fix a v.s an for active / passive

* src/website/compare.html: fix levels ; fix call order when a
change is done to a selector

* src/website/assets/compare.js: add title again; looks like
pre-submit messed up

2023-11-10 pierre <[email protected]>

* src/website/assets/compare.js: fix fieldset and make it disabled
automatically if only one field is present
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ WORKDIR /usr/src/spinorama

COPY . .

RUN [ -x /usr/bin/apt ] && /usr/bin/apt install -y python3 python3-pip imagemagick keychain npm wget python3.10-venv
RUN [ -x /usr/bin/localedef ] && /usr/bin/localedef -f UTF-8 -i en_US en_US.UTF-8
RUN /usr/bin/python3.10 -m venv .venv
RUN . .venv/bin/activate
RUN pip3 install -U -r ./requirements.txt && \
pip3 install -U -r ./requirements-test.txt && \
pip3 install -U -r ./requirements-dev.txt && \
pip3 install -U -r ./requirements-api.txt

RUN npm install --production
RUN npm install --production pyright w3c-html-validator standard flow flow-remove-types

# FROM ubuntu:22.04 AS final

ENV PYTHONPATH=/usr/src/spinorama/src:/usr/src/spinorama/src/website

CMD pytest tests
RUN cd /usr/src/spinorama/src/spinorama && python setup.py build_ext --inplace && ln -s c_compute_scores.cpython-*.so c_compute_scores.so
CMD cd /usr/src/spinorama && pytest tests

EXPOSE 443
67 changes: 47 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
[![Website www.spinorama.org](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.spinorama.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

This library provides an easy way to view, compare or analyse speakers data. This can help you take informed
decision when buying a speaker instead of relying on commercial information or internet buzz.
This library provides an easy way to view, compare or analyse speakers
data. This can help you take informed
decision when buying a speaker instead of relying on commercial
information or internet buzz. There are enough measurements now that
you can do statistical analysis if you wanted too.

## Jump to the [gallery](https://www.spinorama.org) of all (1000+) speakers measurements.

Expand All @@ -18,7 +21,7 @@ It is a way to understand quickly a speaker properties, how it will sound.

Here is an example:

![image](https://github.com/pierreaubert/spinorama/blob/develop/datas/pictures/ex-Genelec-8341A-cea2034.png)
![image](https://www.spinorama.org/speakers/Genelec%208341A/ASR/asr-vertical/CEA2034.html)

- On Axis: this the frequency response. You expect it to be as flat as possible after 100Hz.
- Listening Window: an average of various measurements around on axis. Expected to be close to the previous one.
Expand Down Expand Up @@ -47,18 +50,27 @@ Or if you prefer videos, there is a nice set from [ErinsAudioCorner](https://www

The library support four different formats of data:

1. [Klippel NFS](https://www.klippel.de/products/rd-system/modules/nfs-near-field-scanner.html) format: a set of CSV files.
2. Princeton 3D3A files: they are IR data in [hdf5](https://www.hdfgroup.org/solutions/hdf5/) format
3. Scanned data from a picture with [WebPlotDigitizer](https://automeris.io/WebPlotDigitizer/) (takes 10 minutes per picture)
1. [Klippel NFS](https://www.klippel.de/products/rd-system/modules/nfs-near-field-scanner.html)
format: a set of CSV files. Various variants of the data format are
supported via scripts that allows to convert one format to another.
2. Princeton 3D3A files: they are IR data in [hdf5](https://www.hdfgroup.org/solutions/hdf5/) format.
3. Scanned data from a picture with [WebPlotDigitizer](https://automeris.io/WebPlotDigitizer/).
4. Export in text form from [REW](https://www.roomeqwizard.com/)
5. GLL data files are also (weakly) supported. If you want access to
the automation, then please drop an email. GLL viewer is a Windows
only application and the automation is based on Windows automation.

## Computations

1. Generate CEA2034 data from horizontal and vertical SPL data.
2. Calculate contour plot, radar plot, isolines and isobands.
2. Calculate contour plots, radar plots, isolines and isobands.
3. Estimate basic data for a speaker (-3dB output, flatness over a range, etc)
4. Compute various parameters defined in a paper from Olive (ref. below).
5. It can generate an EQ to optimise the speaker (and get a better preference score) based on anechoic data. Note: this is not yet a room correction software. EQ can be PEQ based but it also can generate a solution for a hardware graphical EQ.
5. It can generate an EQ to optimise the speaker (and get a better
preference score also called Olive score) based on anechoic
data. Note: this is not yet a room correction software. EQ can be
PEQ based but it also can generate a solution for a hardware
graphical EQ.
6. It can compute the effect of an EQ (IIR) on the spinorama.

## Website generation
Expand All @@ -72,16 +84,16 @@ The library support four different formats of data:

# Other ways to look at the graphs in a more interactive way.

If you want to generate the graphs yourself or play with the data you need to install the software.
We have a dedicated [INSTALL section](./tutorial/INSTALL.md).
If you want to generate the graphs yourself or play with the data you need to install the software. Please see
the dedicated [INSTALL section](./tutorial/INSTALL.md).

# How to add a speaker to the database.

We have a dedicated [tutorial](./tutorial/ADDSPEAKER.md).
Please see the dedicated [tutorial](./tutorial/ADDSPEAKER.md).

# How to use the software.

We have a dedicated [manual](./tutorial/HOWTOUSE.md).
Please see the dedicated [manual](./tutorial/HOWTOUSE.md).

# Source of data and citations

Expand All @@ -91,7 +103,10 @@ ASR is a fantastic source of speakers data thanks to [amirm@](https://www.audios

## [ErinsAudioCorner _aka_ EAC](https://www.erinsaudiocorner.com/)

Erin is a motivated person reviewing speakers. He is doing an outstanging jobs. He also has a [Youtube channel](https://youtube.com/c/ErinsAudioCorner). You can also [support him](https://www.erinsaudiocorner.com/contribute/).
Erin is a motivated person reviewing speakers and doing an outstanging
jobs. He also has a [Youtube
channel](https://youtube.com/c/ErinsAudioCorner). You can also
[support him](https://www.erinsaudiocorner.com/contribute/).

## [3D3A](https://www.princeton.edu/3D3A/) is a research organisation at [Princeton](https://www.princeton.edu).

Expand Down Expand Up @@ -123,13 +138,25 @@ Some papers related to finding the optimal IIR filters: I used a different algor

## Speakers manufacturers.

- If you are a manufacturer of speakers, it would be great if you could provide spinorama datas.
- If you are a manufacturer of speakers, it would be great if you could provide spinorama datas. Send me an email [email protected].
- Manufactures with good datas usually in speaker's manual:
- JBL
- Revel
- Genelec
- Adam
- Adam Audio
- Arendal Sound
- Ascend Acoustic
- Buscardt Audio
- DB Audiotechnik
- Devialet
- Eve Audio
- Buscard Audio
- KEF
- Fulcrum Acoustic
- Genelec
- GGNTKT
- JBL
- JTR
- KEF
- Meyer Sound
- Neumann
- Perlisten
- PSI Audio
- Revel
- RCF
- Sigberg Audio
2 changes: 1 addition & 1 deletion check_404.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion check_html.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions check_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -294,7 +294,7 @@ def sanity_check_vendor(vendor: str) -> bool:
VALID_SPL_MAX = 160

VALID_DIM_MIN = 0
VALID_DIM_MAX = 2000
VALID_DIM_MAX = 2500

VALID_WEIGTH_MIN = 0
VALID_WEIGTH_MAX = 500
Expand Down Expand Up @@ -326,7 +326,7 @@ def sanity_check_specifications(name: str, version: str, specs: dict) -> int:
status = 1
try:
fangle = float(angle)
if fangle < VALID_ANGLE_MIN or fangle >= VALID_ANGLE_MAX:
if fangle < VALID_ANGLE_MIN or fangle > VALID_ANGLE_MAX:
logging.error(
"%s: measurement %s angle %s is not in ]%d, %d]",
name,
Expand Down
2 changes: 1 addition & 1 deletion check_peqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion cleanup_docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A library to display spinorama charts
#
# Copyright (C) 2020-2023 Pierre Aubert pierre(at)spinorama(dot)org
# Copyright (C) 2020-2024 Pierre Aubert pierre(at)spinorama(dot)org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 0 additions & 4 deletions datas/#.blac#

This file was deleted.

Loading

0 comments on commit 40293c0

Please sign in to comment.