The title of this question is already very clear I quess. I want to read a wav file and get pulses as 1 and silence as 0 and the duration of it in microseconds.
The reason is this, I have recorded a demolutaded 433Mhz signal from a car navigation system (using an unknown protocol). The wav is amplified (clipping) to straighten lines and a DC-offset is added to make it a perfect PWM square wave (in Audacity):
Have downloaded the cli application sox
however overwhelmed by the amount of options, don't know where to start, really. Of course searching for a solution online how to do this, however cannot find anything.
Three questions:
- Is it possible what I want to do?
- What command-line options do I need to use?
- Can sox do what I did with Audicity (to be able to automate the process in a batch file)?
Output example (bit,duration):
0,255
1,100
0,50
1,200
etc.
These 'tables' can be easily used to create arrays in C/C++, to use with a microcontroller to finally mimic the remote control.
Any suggestions?