Skip to content

Commit ee0b00f

Browse files
committed
Pull upstream changes to libjamesdsp + 2 new liveprog files
1 parent bb86a1d commit ee0b00f

File tree

4 files changed

+188
-0
lines changed

4 files changed

+188
-0
lines changed

libjamesdsp/libjamesdsp.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ SOURCES += \
6969
$$BASEPATH/Effects/eel2/numericSys/FilterDesign/firls.c \
7070
$$BASEPATH/Effects/eel2/numericSys/FilterDesign/generalFdesign.c \
7171
$$BASEPATH/Effects/eel2/numericSys/FilterDesign/polyphaseASRC.c \
72+
$$BASEPATH/Effects/eel2/numericSys/FilterDesign/polyphaseFilterbank.c \
7273
$$BASEPATH/Effects/eel2/numericSys/MersenneTwister.c \
7374
$$BASEPATH/Effects/eel2/numericSys/SolveLinearSystem/inv.c \
7475
$$BASEPATH/Effects/eel2/numericSys/SolveLinearSystem/mldivide.c \

resources/assets/liveprog/pfb.eel

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
desc: Polyphase filterbank (Equalization example)
2+
3+
@init
4+
N = 8;
5+
m = 3;
6+
pfb1 = 0;
7+
memSize = InitPolyphaseFilterbank(srate, N, m, pfb1, pfb2);
8+
PolyphaseFilterbankChangeWarpingFactor(pfb1, srate, 0.99);
9+
phaseCorrFilt = pfb2 + memSize;
10+
corrFiltLen = PolyphaseFilterbankGetPhaseCorrector(pfb1, 0.5, phaseCorrFilt);
11+
Sk = phaseCorrFilt + corrFiltLen;
12+
PolyphaseFilterbankGetDecimationFactor(pfb1, Sk);
13+
i = 0;
14+
loop(corrFiltLen,
15+
//printf("%1.7f,", phaseCorrFilt[i]);
16+
i += 1);
17+
printf("PFB memSize = %d\ncorrFiltLen = %d\n", memSize, corrFiltLen);
18+
subbandOutputLeft = Sk + N;
19+
subbandOutputRight = subbandOutputLeft + N;
20+
decimationCnt = subbandOutputRight + N;
21+
eqGain = decimationCnt + N;
22+
eqGain[0] = 1;
23+
eqGain[1] = 0;
24+
eqGain[2] = 1;
25+
eqGain[3] = 0;
26+
eqGain[4] = 1;
27+
eqGain[5] = 0;
28+
eqGain[6] = 1;
29+
30+
@sample
31+
32+
PolyphaseFilterbankAnalysisStereo(pfb1, pfb2, subbandOutputLeft, subbandOutputRight, decimationCnt, spl0, spl1);
33+
34+
i = 0;
35+
loop(N,
36+
decimationCnt[i] == Sk[i] ? (
37+
subbandOutputLeft[i] = subbandOutputLeft[i] * eqGain[i];
38+
subbandOutputRight[i] = subbandOutputRight[i] * eqGain[i];
39+
);
40+
i += 1);
41+
PolyphaseFilterbankSynthesisStereo(pfb1, pfb2, subbandOutputLeft, subbandOutputRight, y1, y2);
42+
spl0 = y1;
43+
spl1 = y2;

resources/assets/liveprog/stftDenoise.eel

Lines changed: 142 additions & 0 deletions
Large diffs are not rendered by default.

resources/resources.qrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@
6262
<file>assets/vdc/Butterworth.vdc</file>
6363
<file>assets/vdc/FrontRearContrast.vdc</file>
6464
<file>assets/vdc/mh750.vdc</file>
65+
<file>assets/liveprog/pfb.eel</file>
66+
<file>assets/liveprog/stftDenoise.eel</file>
6567
</qresource>
6668
</RCC>

0 commit comments

Comments
 (0)