roel0 / pcm2wav-py Goto Github PK
View Code? Open in Web Editor NEWPCM data (Ex. I2S), obtained with a logic analyzer, to Wav audio format converter
License: GNU General Public License v2.0
PCM data (Ex. I2S), obtained with a logic analyzer, to Wav audio format converter
License: GNU General Public License v2.0
I've noticed that when calling the PCM2Wav constructor, it is not taking the channel number specified in the CSV file into consideration. For example, if we have the following CSV sample:
0.000011560000000,2,0
0.000021960000000,1,6785
0.000032360000000,2,0
0.000042800000000,1,6906
0.000053200000000,2,0
0.000063640000000,1,5487
The generated WAV file will have a silent left channel (since it takes whatever is in the first row as left channel, despite being channel 2). If we remove the first line, the generated WAV file will now have a silent right channel (i.e. swapped channels). Do you think this is something that this module should automatically handle?
I was unable to install PCM2Wav==1.3 on some installations, and I narrowed down the cause to the fact that only a .egg file is available in PyPI for 1.3: https://pypi.org/project/PCM2Wav/1.3/#files
Is it possible to add the .tar.gz file, similar to what is available for 1.2? Thanks!
I'd like to convert Saleae logicpro pcm file to wav,
But it shows some issue.
File "D:\python_project\pcm2wav2\PCM2Wav\PCM2Wav.py", line 54, in _generate
frame = self._calc_frame(channels)
UnboundLocalError: local variable 'channels' referenced before assignment
Source code only support 'short' variable format:(-32768) <= supported value <= 32767
So, it makes error when value is out of range.
Some value was 65532,......
Can I modify "__formats = {1: 'c', 2: 'h'}" --> __formats = {1: 'c', 2: 'i'}?
Hi,
Thanks for the great work.
This software doesn't seems to work with the latest saleae-logic-alpha 2.3.13-1.
There are two ways to export the data:
Time [s] | Channel 0 | Channel 1 | Channel 2
1.20147512 | 1 | 0 | 0
1.20147544 | 0 | 0 | 0
1.20147577 | 1 | 0 | 0
1.20147609 | 0 | 0 | 0
1.20147642 | 1 | 0 | 0
Or
name | type | start_time | duration | channel | data
I2S / PCM | data | 1.20148586 | 9.76E-06 | 0x0000000000000001 | 0x0000000000000000
I2S / PCM | data | 1.20149628 | 9.76E-06 | 0x0000000000000000 | 0x0000000000000000
I2S / PCM | data | 1.20150669 | 9.77E-06 | 0x0000000000000001 | 0x0000000000000000
I2S / PCM | data | 1.20151711 | 9.76E-06 | 0x0000000000000000 | 0x0000000000000000
I2S / PCM | data | 1.20152753 | 9.76E-06 | 0x0000000000000001 | 0x0000000000000000
I2S / PCM | data | 1.20153794 | 9.77E-06 | 0x0000000000000000 | 0x0000000000000000
I2S / PCM | data | 1.20154836 | 9.76E-06 | 0x0000000000000001 | 0x0000000000000000
Neither of these two ways seems to generate a valid file.
I did capture I2S audio data using Saleae Logic Pro.
(using 1.2.18)
Options menu โ Export data โ Export (i2s.csv *download here)
and use python commands, export wav.file. (example.wav *download here)
but it's wrong file.
Please help me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.