WIP - aligns the SynthesizerViewer configuration with that of the

ChannelizerViewer so that we can compare the two-channel synthesis
operations.  The SynthesizerViewer is successfully down-sampling and
synthesizing two 25.0 kHz channels into a combined 25.0 kHz channel with
no noticeable drop/nulling in the joined region.  However, the channelizer
viewer's synthesized channels definitely have a null in the joined
region.  I suspect that the channelizer is not quite where it needs to
be and am going to start experimenting there.
This commit is contained in:
Denny
2018-01-27 16:27:58 -05:00
parent 673c8a2423
commit e78d2339ff
3 changed files with 10 additions and 8 deletions

View File

@@ -349,7 +349,7 @@ public class ChannelizerViewer extends JFrame
{
setLayout(new MigLayout("insets 0 0 0 0", "[center,grow,fill][]", "[grow,fill][]"));
mSpectrumPanel = new SpectrumPanel(settingsManager);
mSpectrumPanel.setSampleSize(28);
mSpectrumPanel.setSampleSize(22);
add(mSpectrumPanel, "span");
add(new JLabel("Center:" + frequency));

View File

@@ -49,7 +49,7 @@ public class PolyphaseChannelManager implements ISourceEventProcessor
private final static Logger mLog = LoggerFactory.getLogger(PolyphaseChannelManager.class);
private static final double MINIMUM_CHANNEL_BANDWIDTH = 12500.0;
private static final double CHANNEL_OVERSAMPLING = 2.0;
private static final int POLYPHASE_FILTER_TAPS_PER_CHANNEL = 17;
private static final int POLYPHASE_FILTER_TAPS_PER_CHANNEL = 19;
private Broadcaster<SourceEvent> mSourceEventBroadcaster = new Broadcaster<>();
private IComplexBufferProvider mComplexBufferProvider;
@@ -483,7 +483,7 @@ public class PolyphaseChannelManager implements ISourceEventProcessor
if(taps == null)
{
taps = FilterFactory.getSincM2Synthesizer(mChannelCalculator.getChannelSampleRate(), channels,
taps = FilterFactory.getSincM2Synthesizer(mChannelCalculator.getChannelBandwidth(), channels,
POLYPHASE_FILTER_TAPS_PER_CHANNEL, Window.WindowType.BLACKMAN_HARRIS_7, true);
mOutputProcessorFilters.put(channels, taps);

View File

@@ -18,6 +18,7 @@ package io.github.dsheirer.dsp.filter.channelizer;
import io.github.dsheirer.dsp.filter.FilterFactory;
import io.github.dsheirer.dsp.filter.Window;
import io.github.dsheirer.dsp.filter.design.FilterDesignException;
import io.github.dsheirer.dsp.mixer.FS4DownConverter;
import io.github.dsheirer.dsp.mixer.IOscillator;
import io.github.dsheirer.dsp.mixer.LowPhaseNoiseOscillator;
import io.github.dsheirer.sample.Listener;
@@ -149,7 +150,7 @@ public class SynthesizerViewer extends JFrame
{
setLayout(new MigLayout("insets 0 0 0 0", "[grow,fill]", "[grow,fill]"));
mSpectrumPanel = new SpectrumPanel(settingsManager);
mSpectrumPanel.setSampleSize(12);
mSpectrumPanel.setSampleSize(22);
add(mSpectrumPanel);
mDFTProcessor.addConverter(mComplexDecibelConverter);
@@ -190,7 +191,7 @@ public class SynthesizerViewer extends JFrame
{
setLayout(new MigLayout("insets 0 0 0 0", "[grow,fill]", "[grow,fill][]"));
mSpectrumPanel = new SpectrumPanel(settingsManager);
mSpectrumPanel.setSampleSize(12);
mSpectrumPanel.setSampleSize(22);
add(mSpectrumPanel, "wrap");
add(channelControlPanel);
@@ -235,12 +236,11 @@ public class SynthesizerViewer extends JFrame
public class ChannelControlPanel extends JPanel
{
private static final int SAMPLE_RATE = 25000;
private static final int MIN_FREQUENCY = -6250;
private static final int MAX_FREQUENCY = 6250;
private static final int DEFAULT_FREQUENCY = 50;
private IOscillator mOscillator = new LowPhaseNoiseOscillator(6000, CHANNEL_SAMPLE_RATE);
private IOscillator mOscillator = new LowPhaseNoiseOscillator(DEFAULT_FREQUENCY, CHANNEL_SAMPLE_RATE);
public ChannelControlPanel()
{
@@ -272,7 +272,8 @@ public class SynthesizerViewer extends JFrame
public class DataGenerationManager implements Runnable
{
private TwoChannelSynthesizerM2 mSynthesizer;
private int mSamplesPerCycle = 25000 / DATA_GENERATOR_FRAME_RATE;
private FS4DownConverter mFS4DownConverter = new FS4DownConverter();
private int mSamplesPerCycle = CHANNEL_SAMPLE_RATE / DATA_GENERATOR_FRAME_RATE;
public DataGenerationManager()
{
@@ -295,6 +296,7 @@ public class SynthesizerViewer extends JFrame
float[] channel2 = getChannel2ControlPanel().getOscillator().generateComplex(mSamplesPerCycle);
float[] synthesized = mSynthesizer.process(channel1, channel2);
mFS4DownConverter.mixComplex(synthesized);
getChannel1Panel().receive(new ComplexBuffer(channel1));
getChannel2Panel().receive(new ComplexBuffer(channel2));