This analyzer is useful for PDM streams. It counts the number of 1s present on the data line for a given clock's rising and falling edges. Within the GUI left/right channel values are separated by commas, and when exported as CSV they are saved as separate columns.
It does its best to start with the clock signal. However, it may be shifted against the samples you receive in your code. Changing the bits per sample configuration sample to 1 can make it easy to read individual bits instead of the ones count for a set of bits.
These scripts process the PDM data exported as CSV from Logic so that they can be imported into Audacity for analysis. smash_csv will take two separate CSV files (each containing left/right PDM channel data) and smash them into a single CSV file with 4 channels. handle_pdm will then take that smashed CSV data, run it through a simple CIC filter, and output a 4-channel raw PCM binary that can be imported into Audacity.
Use the Visual Studio project to compile.
python build_analyzer.py
Set the search path for plugins to the release
directory within your clone of
this repo.
To find the setting:
- Open the Options drop down in the top right.
- Select Preferences
- Select the Developer tab.
- The analyzer path is first in the pane.
Now, reload Logic and select PDM from the Analyzer drop down.
Please see the Sample Analyzer for detailed build instructions.