Skip to content

Commit

Permalink
fix bad qsys filters
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Jul 26, 2024
1 parent aab7821 commit 22025d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions ezbeq/qsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def __send_component(self, name: str, controls: list, sock):
}
}
logger.info(f"Sending to component {name} with {len(controls)} controls")
sock.sendall(json.dumps(jsonrpc).encode('utf-8'))
encoded = json.dumps(jsonrpc).encode('utf-8')
logger.info(encoded)
sock.sendall(encoded)
sock.sendall(TERMINATOR.encode('utf-8'))
msg = self.__recvall(sock)
if msg:
Expand Down Expand Up @@ -245,16 +247,19 @@ def to_rpc(self, slot: int):

@property
def coeffs(self) -> List[float]:
if self.filter_type_name == 2.0:
if self.filter_type_name == 'LowShelf':
from ezbeq.iir import LowShelf
filt = LowShelf(self.fs, self.fc, self.q, self.gain)
elif self.filter_type_name == 1.0:
elif self.filter_type_name == 'PeakingEQ':
from ezbeq.iir import PeakingEQ
filt = PeakingEQ(self.fs, self.fc, self.q, self.gain)
else:
elif self.filter_type_name == 'HighShelf':
from ezbeq.iir import HighShelf
filt = HighShelf(self.fs, self.fc, self.q, self.gain)
else:
raise ValueError(f"Filter type {self.filter_type_name} not supported")
return filt.b + filt.a

def __repr__(self):
return f"{self.filter_type_name} {self.fc} Hz {self.gain} dB {self.q}"

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ezbeq"
version = "2.1.0a6"
version = "2.1.0a7"
description = "A webapp which can send beqcatalogue filters to a DSP device"
authors = ["3ll3d00d <mattkhan+ezbeq@gmail.com>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ezbeq",
"version": "0.1.0",
"private": true,
"type":"module",
"type": "module",
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
Expand Down

0 comments on commit 22025d7

Please sign in to comment.