We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I tried to run the voice player example program for the mcb2130 on the 2140 board. The program works with the sample audio given. When I recorded my own audio(.WAV), converted it using the BIN2HEX converter, it does not work. I hear a distorted audio and not the recorded file. The file I recorded the audio with 16 bit PCM mono and 8KHz sampling frequency as specified.
What should I do to record my own audio?
Isn't the easiest answer to compare the wave data you generated with the wave data used with the sample audio? That should tell you if you might have swapped low/high byte or if there are some other issues with your audio data.
Information about the file will be printed out on the UART. If the header information about your WAV differs in number of channels, sample rate, bytes per second, alignment or resolution you should get an indication if there is a problem with your encoding.
Got it.Thank you.
I want to know where the hex file is stored in the memory and manipulate the bits to see how the audio changes.But the hex file doesn't seem to be stored in one piece in a continuous memory space.How can I find the hex file in the memory?
If you look at the convert.bat that is in the AudioData folder you get an idea where the individual WAV-Files are located:
BIN2HEX /L65536 /O65536 /4 /T /Q Block1.wav Audio.h86 BIN2HEX /L65536 /O131072 /4 /A /T /Q Block2.wav Audio.h86 BIN2HEX /L65536 /O196608 /4 /A /T /Q Block3.wav Audio.h86 BIN2HEX /L65536 /O262144 /4 /A /T /Q Block4.wav Audio.h86 BIN2HEX /L65536 /O327680 /4 /A /T /Q Block5.wav Audio.h86 BIN2HEX /L65536 /O393216 /4 /A /T /Q Block6.wav Audio.h86 BIN2HEX /L53248 /O458752 /4 /A /Q Block7.wav Audio.h86
The /O parameter specifies an decimal offset within the Hexfile. From this you will see that the start addresses are 0x10000, 0x20000, 0x30000, etc...
I appreciate your help.
Yes. I can see that they are stored in those addresses. They actually take 7 bits more than the file size specified in the UART window.
Can I change these values to see how the audio is affected? When I attempt to change them directly in the memory window they do change in simulation.
Is this code memory or data memory?Can I write code to change few bit values and see how the audio changes?
This is Flash ROM. You cannot modify these areas with the memory window.
Can I view the data memory locations and the values they hold through the memory window? The variables I create are given memory in the data memory, right? I know I can see the values by entering the variable names in the watch window...but can I view them in the memory window like I can see the Flash ROM?