Hello everybody!
Recently I started a topic on a possibility of loading and playing/processing an external audio sample in SS (adau1701 in my case). Since new questions appeared, I decided to bring all that into a separated topic and hope that the moderators wont object. Thanks to Brett, I found out that such thing was possible, the major problem was conversion of a, say, wav file into a set of values, suitable for loading into a lookup table. I think there is a quite simple way, which I will put here in details. Meanwhile please somebody help me with some additional questions. Say, I have the data values, I start a new projects, which just takes the values from memory and plays them through an output. Could anybody please help me with blocks, before I have done something foolish? I believe, I should take a stopwatch (w/external reset if I need the sample to be repeated), connect it to the "index lookup table" block and then... Should I simply connect the out pin of the lookup table right to the output? Or there must be some additional block "X" in between? Other words, if the lookup table will simply shoot the data values from its output, then I believe I am simply to connect the table to the output of the 1701, right? Or I missed something... Anyways, many thanks in advance for help and here is the detailed guide how to convert an audio file into them data values.
1. Create or open a sound file in Cool Edit pro (versions 1.0-2.1 will work)
2. Press "Save as" and choose .txt file as an output. The out file will have numbers, but much greater than 1 to -1 integers, shortly speaking.
3. Copy all the values into the clipboard.
4. Open Excel and paste all the values.
5. Now it is time to remove the empty cells (caused by line changes in the txt file)
6. Select all the cells, press Edit>Go To>Special, select "blanks" and press OK Now all the blank cells are selected
7. Press edit>delete to delete the empty cells.
8. Now, in a new cell, type a constant by which you want to divide the data values (in case of a 16-bit sound file the constant is 32767)
9. Copy the cell with the constant into the clipboard.
10. Select all cells you want to process.
11. Press Edit>Paste Special, select "Divide" and press ok.
12. Done!! The values are ready!