Wave0.begin(0.3, wavefreq, WAVEFORM_ARBITRARY) Playing a 440 sound sample of 257 sample points for a 1 period in the teensy array gave me. I did a rough test and recorded teensy output in Audacity, and viewed it at 44.1 sample rate in audacity. This is the bit puzzling me.I don't seem to be using all to values put in the 257 array.?.when I play the recorded freq of the sound.? When I record the playback from teensy using Audacity I get 100 samples again for the waveform at that freq. And all compiled and worked providing I keep the corner freq about 2000 Hz. I exported the data for 1 period using Audacity sample data export, opened it in a spreadsheet, multiplied the values by 65535, appended a comma after each one and copied this into a header file in the Arduino IDE. That gave me 257 samples for 1 period of the waveform. I then copied a section of the audio, to the clipboard, set the project rate to (256 x 44100 / 100) = 112896, then opened a new mono track and pasted in the audio data. I know I think the filtering should actually be done at the analogue stage of recording before it is digitized, but I only had a digital wav file to start with. So I opened the wav file in Audacity and run the Effects Low pass filter corner freq. To create the data array for teensy I need 256 samples (256 + 1 same start and end, an array of 257). If I have a wav file of frequency 441 Hz say that gives me 100 samples for 1 period. I understand teensy is playing it from a data array in memory and Audacity is playing direct from the file. What would be the difference in Audacity playing a 44.1 wave or teensy playing it.?.both at 44.1. I thought if I used wavs sampled at 44.1 that played at 44.1 on a PC, and teensy was sampling at 44.1 there would not be a problem. I also tried converting some sound samples for arbitrary sounds from wav files and find alot of aliasing. I can get it to work fine using the samples downloaded from your links. I am trying out synth waveforms using teens圓.1 and the audio adaptor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |