donrecardo
Member
Hi,
I want to make a sound output device on a model train using a teensy
When the train wheel makes one revolution the sound would be triggered "Chuff"
What I want to know is if I had a sound sample " Chuff "on an SD card that was say 900mS long
and I triggered it once per second then I can see I would get a chuff and a 100mS pause that would keep repeating
for as long as the triggers kept coming, so far so good
but what if the trigger comes every 1/2 second or even faster? the re trigger would happen before the sample had finished
would it ignore the second trigger because the sample is still playing ? or would it halt the sample playback and restart it playing from the beginning
What I want is for the sound to retrigger to the beginning of the sample as soon as it gets a trigger so in fact in may be going Chu Chu or ch ch rather than the full Chuff
What I dont want is that once triggered it must complete the full sample sound even though its being triggered sooner
So, is it possible can I restart the sample from the beginning whilst it was still playing ? and is it difficult to do ?
Hope someone can help
Don
I want to make a sound output device on a model train using a teensy
When the train wheel makes one revolution the sound would be triggered "Chuff"
What I want to know is if I had a sound sample " Chuff "on an SD card that was say 900mS long
and I triggered it once per second then I can see I would get a chuff and a 100mS pause that would keep repeating
for as long as the triggers kept coming, so far so good
but what if the trigger comes every 1/2 second or even faster? the re trigger would happen before the sample had finished
would it ignore the second trigger because the sample is still playing ? or would it halt the sample playback and restart it playing from the beginning
What I want is for the sound to retrigger to the beginning of the sample as soon as it gets a trigger so in fact in may be going Chu Chu or ch ch rather than the full Chuff
What I dont want is that once triggered it must complete the full sample sound even though its being triggered sooner
So, is it possible can I restart the sample from the beginning whilst it was still playing ? and is it difficult to do ?
Hope someone can help
Don