I'm the newby to BCI2000. I'm working to implement the bandpass filter on AR filter chain. For now, I could create the NewBCI2000Filter following by the instruction from the Wiki. And I just did a step by step for the sample of LowPass filter but it also has some error too. So how could I implement the bandpass filter either by AR filter chain or other method? Please help
Best regard,
Aug
Bandpass filter on AR filter chain
Re: Bandpass filter on AR filter chain
OK, I got it for the low pass filter and still working on the bandpass
Re: Bandpass filter on AR filter chain
It might be of interest to you that there is a IIRFilterBase class in the src/shared/modules/signalprocessing directory, which may be used together with src/extlib/math/FilterDesign to create a user-configurable IIR filter.
There also exists a SourceFilter in src/shared/modules/signalsource which provides user-configurable high-pass, low-pass, and notch filters using IIRFilterBase and FilterDesign. For your project, it might be most efficient to copy and rename that filter, and adapt it to your needs. FilterDesign provides a Bandpass option as well as a the Lowpass/Highpass options used in the SourceFilter.
Juergen
There also exists a SourceFilter in src/shared/modules/signalsource which provides user-configurable high-pass, low-pass, and notch filters using IIRFilterBase and FilterDesign. For your project, it might be most efficient to copy and rename that filter, and adapt it to your needs. FilterDesign provides a Bandpass option as well as a the Lowpass/Highpass options used in the SourceFilter.
Juergen
Re: Bandpass filter on AR filter chain
Dear Juergen,mellinger wrote:It might be of interest to you that there is a IIRFilterBase class in the src/shared/modules/signalprocessing directory, which may be used together with src/extlib/math/FilterDesign to create a user-configurable IIR filter.
There also exists a SourceFilter in src/shared/modules/signalsource which provides user-configurable high-pass, low-pass, and notch filters using IIRFilterBase and FilterDesign. For your project, it might be most efficient to copy and rename that filter, and adapt it to your needs. FilterDesign provides a Bandpass option as well as a the Lowpass/Highpass options used in the SourceFilter.
Juergen
Thank you very much for your advised, I'm trying to edit the SourceFilter as your advise. But I still have some problem, I would like to know how to build that SourceFilter or it was already in BCI2000Luncher or anything else, how could I get the result from this filter, guide me please. Sorry for my noob and newby
Best regard,
Aug
Re: Bandpass filter on AR filter chain
Dear August,
you are welcome to ask questions here. BCI2000 is evolving constantly, so not everything is documented on the wiki. Your questions help us know how to improve documentation.
The SourceFilter is a special filter which is used in certain source modules, e.g. in the gMOBIlab and gMOBIlabPlus source modules. These amplifiers don't have hardware filters built-in, so the SourceFilter is provided as a substitute. The SourceFilter is special in that it operates on the signal acquired from the amplifier before it gets saved to disk -- all other BCI2000 filters only operate after the signal has been saved to disk, so they don't affect the recording.
There is currently no signal processing module that contains the SourceFilter, but the following should work:
*Choose a Signal Processing Module that most closely resembles your needs.
*Edit that Signal Processing Module's CMakeLists.txt file. Above the line beginning with BCI2000_ADD_..., add a line that says
BCI2000_INCLUDE( "SOURCEFILTER" )
*Edit the module's PipeDefinition.cpp file. Add two lines
#include "SourceFilter.h"
Filter( SourceFilter, 2.0 )
*The second argument to the Filter() statement is a string that defines the filter's position in the filter chain, by string comparison with other filters' position strings. If you don't want the SourceFilter to appear first in the chain, you may choose a different string there.
Regards,
Juergen
you are welcome to ask questions here. BCI2000 is evolving constantly, so not everything is documented on the wiki. Your questions help us know how to improve documentation.
The SourceFilter is a special filter which is used in certain source modules, e.g. in the gMOBIlab and gMOBIlabPlus source modules. These amplifiers don't have hardware filters built-in, so the SourceFilter is provided as a substitute. The SourceFilter is special in that it operates on the signal acquired from the amplifier before it gets saved to disk -- all other BCI2000 filters only operate after the signal has been saved to disk, so they don't affect the recording.
There is currently no signal processing module that contains the SourceFilter, but the following should work:
*Choose a Signal Processing Module that most closely resembles your needs.
*Edit that Signal Processing Module's CMakeLists.txt file. Above the line beginning with BCI2000_ADD_..., add a line that says
BCI2000_INCLUDE( "SOURCEFILTER" )
*Edit the module's PipeDefinition.cpp file. Add two lines
#include "SourceFilter.h"
Filter( SourceFilter, 2.0 )
*The second argument to the Filter() statement is a string that defines the filter's position in the filter chain, by string comparison with other filters' position strings. If you don't want the SourceFilter to appear first in the chain, you may choose a different string there.
Regards,
Juergen
Re: Bandpass filter on AR filter chain
Dear Juergen,mellinger wrote:Dear August,
you are welcome to ask questions here. BCI2000 is evolving constantly, so not everything is documented on the wiki. Your questions help us know how to improve documentation.
The SourceFilter is a special filter which is used in certain source modules, e.g. in the gMOBIlab and gMOBIlabPlus source modules. These amplifiers don't have hardware filters built-in, so the SourceFilter is provided as a substitute. The SourceFilter is special in that it operates on the signal acquired from the amplifier before it gets saved to disk -- all other BCI2000 filters only operate after the signal has been saved to disk, so they don't affect the recording.
There is currently no signal processing module that contains the SourceFilter, but the following should work:
*Choose a Signal Processing Module that most closely resembles your needs.
*Edit that Signal Processing Module's CMakeLists.txt file. Above the line beginning with BCI2000_ADD_..., add a line that says
BCI2000_INCLUDE( "SOURCEFILTER" )
*Edit the module's PipeDefinition.cpp file. Add two lines
#include "SourceFilter.h"
Filter( SourceFilter, 2.0 )
*The second argument to the Filter() statement is a string that defines the filter's position in the filter chain, by string comparison with other filters' position strings. If you don't want the SourceFilter to appear first in the chain, you may choose a different string there.
Regards,
Juergen
Thank you very much for your willing to help. But I still have a problem with "Unknown CMake command "BCI2000_INCLUDE"." when I try to build the project. So any suggestion? Thanks again.
Best regard,
Aug
Re: Bandpass filter on AR filter chain
August,
you need to update to the latest version of BCI2000 from SVN. There has been a change to the CMake system recently.
Regards,
Juergen
you need to update to the latest version of BCI2000 from SVN. There has been a change to the CMake system recently.
Regards,
Juergen
Re: Bandpass filter on AR filter chain
Dear Juergen,mellinger wrote:August,
you need to update to the latest version of BCI2000 from SVN. There has been a change to the CMake system recently.
Regards,
Juergen
Thank you so much for your willing to help
Best regard,
Aug
Who is online
Users browsing this forum: No registered users and 30 guests