I converted a couple of samples from Audactiy using the method you decsribed. However, when I try to add them to the example 'sample' sketch, I get lots of errors.
This is the code I tried to upload. I simply changed the names for your Burroughs sample to the info from the table I created, but it won't run:
[code]
/* Example of playing a sampled sound,
using Mozzi sonification library.
Demonstrates one-shot samples scheduled
with EventDelay.
Circuit: Audio output on digital pin 9 on a Uno or similar, or
DAC/A14 on Teensy 3.1, or
check the README or
http://sensorium.github.com/Mozzi/ Mozzi help/discussion/announcements:
https://groups.google.com/forum/#!forum/mozzi-users Tim Barrass 2012, CC by-nc-sa.
*/
#include <MozziGuts.h>
#include <Sample.h> // Sample template
#include <samples/dancerclip2.h>
#include <EventDelay.h>
#define CONTROL_RATE 64
// use: Sample <table_size, update_rate> SampleName (wavetable)
Sample <dancerclip2_NUM_CELLS, AUDIO_RATE> aSample(dancerclip2_DATA);
// for scheduling sample start
EventDelay kTriggerDelay;
void setup(){
startMozzi(CONTROL_RATE);
aSample.setFreq((float) dancerclip2_SAMPLERATE / (float) dancerclip2_NUM_CELLS); // play at the speed it was recorded
kTriggerDelay.set(1500); // 1500 msec countdown, within resolution of CONTROL_RATE
}
void updateControl(){
if(kTriggerDelay.ready()){
aSample.start();
kTriggerDelay.start();
}
}
int updateAudio(){
return (int) aSample.next();
}
void loop(){
audioHook();
}
[/code]
Any help appreciated. Thanks in advance.