2022-09-03 14:07:44 +00:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 1,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"from lasp import SeriesBiquad\n",
|
|
|
|
"import numpy as np"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2022-09-03 18:59:14 +00:00
|
|
|
"execution_count": 2,
|
2022-09-03 14:07:44 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stderr",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2022-09-03 18:59:14 +00:00
|
|
|
"2022-09-03 17:21:46+0200 DebugTrace-cpp 2.0.0a2 (g++ 12.2.0)\n",
|
|
|
|
"2022-09-03 17:21:46+0200 \n",
|
|
|
|
"2022-09-03 17:21:46+0200 Enter SeriesBiquad (lasp_biquadbank.cpp: 12)\n",
|
|
|
|
"2022-09-03 17:21:46+0200 Leave SeriesBiquad (lasp_biquadbank.cpp)\n"
|
2022-09-03 14:07:44 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"coefs = np.array([1.,0,0,1.,-.9,0])\n",
|
|
|
|
"bq = SeriesBiquad(coefs)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2022-09-03 18:59:14 +00:00
|
|
|
"execution_count": 3,
|
2022-09-03 14:07:44 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stderr",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2022-09-03 18:59:14 +00:00
|
|
|
"2022-09-03 17:21:47+0200 \n",
|
|
|
|
"2022-09-03 17:21:47+0200 Enter filter (lasp_biquadbank.cpp: 44)\n",
|
|
|
|
"2022-09-03 17:21:47+0200 Leave filter (lasp_biquadbank.cpp)\n"
|
2022-09-03 14:07:44 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"x = np.zeros(10, dtype=float)\n",
|
|
|
|
"x[0] = 1\n",
|
|
|
|
"\n",
|
|
|
|
"x2 = bq.filter(x)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2022-09-03 18:59:14 +00:00
|
|
|
"execution_count": 4,
|
2022-09-03 14:07:44 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"text/plain": [
|
|
|
|
"array([[1. ],\n",
|
|
|
|
" [0.9 ],\n",
|
|
|
|
" [0.81 ],\n",
|
|
|
|
" [0.729 ],\n",
|
|
|
|
" [0.6561 ],\n",
|
|
|
|
" [0.59049 ],\n",
|
|
|
|
" [0.531441 ],\n",
|
|
|
|
" [0.4782969 ],\n",
|
|
|
|
" [0.43046721],\n",
|
|
|
|
" [0.38742049]])"
|
|
|
|
]
|
|
|
|
},
|
2022-09-03 18:59:14 +00:00
|
|
|
"execution_count": 4,
|
2022-09-03 14:07:44 +00:00
|
|
|
"metadata": {},
|
|
|
|
"output_type": "execute_result"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"x2"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
2022-09-03 18:59:14 +00:00
|
|
|
"display_name": "Python 3",
|
2022-09-03 14:07:44 +00:00
|
|
|
"language": "python",
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
2022-09-03 18:59:14 +00:00
|
|
|
"version": "3.10.6"
|
2022-09-03 14:07:44 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 4
|
|
|
|
}
|