Monday, July 6, 2015

pd30. Sample based synthesis in Pure Data

One of the drum samples in LMMS DAW is used. It is an ogg file and should be converted to wav. You can convert it by using Audacity (open the ogg file and export it as wav). It has been copied to the sounds folder in current directory.


It is loaded into arrays d01_ch1 and d01_ch2, for the two channels. We first have to click on the read message to load the file and send it to the soundfiler object which will initialize the two arrays. For mono audio, there will be only one channel and one array. The resize option changes the arrays to size of sound, and which is 19723 samples in this case. Since 44100 samples is one second, 19723 samples is a little less than 0.5 second.


The tabplay will play the sample without interpolation, at the cd rate of 44100.


No comments:

Post a Comment