Hi all, I have a question for any Psychportaudio users. I'm trying to do teh following:
I have a large number of small sound files (~800 ms), each of which is loaded into its own psychportaudio buffer. What I want to do is play them in a sequence *roughly* 500-700 ms apart, with two stipulations which are my problem:
1) The onset time of each sound file can change dynamically during the sequence... i.e., we don't know (based on some participant feedback) until just after sound a has started whether sound b needs to start 500, 525, 550 etc ms after sound a started. To solve this I could of course psychportaudio refillbuffer to selectively "punch in" sound b into thr ongoing buffer but:
2) because of a combination of clip length and time between onsets, sounds a and b would overlap. I DON'T want to just abruptly stop sound a and start b, I'd like to mix them. Of course, if onset times were predicatble then I could just create a big buffer and mix the sounds myself, but, see point 1 :-)
So, is there any way I'm missing of being able to dynamically update a playing buffer by MERGING a second buffer into it rather than replacing information in there? (or alternatively, to read out what that section of the buffer currently contains, so I can create a new mixed buffer to "punch in"?)
Thanks for any help, ladies and gentlemen
Jim
I have a large number of small sound files (~800 ms), each of which is loaded into its own psychportaudio buffer. What I want to do is play them in a sequence *roughly* 500-700 ms apart, with two stipulations which are my problem:
1) The onset time of each sound file can change dynamically during the sequence... i.e., we don't know (based on some participant feedback) until just after sound a has started whether sound b needs to start 500, 525, 550 etc ms after sound a started. To solve this I could of course psychportaudio refillbuffer to selectively "punch in" sound b into thr ongoing buffer but:
2) because of a combination of clip length and time between onsets, sounds a and b would overlap. I DON'T want to just abruptly stop sound a and start b, I'd like to mix them. Of course, if onset times were predicatble then I could just create a big buffer and mix the sounds myself, but, see point 1 :-)
So, is there any way I'm missing of being able to dynamically update a playing buffer by MERGING a second buffer into it rather than replacing information in there? (or alternatively, to read out what that section of the buffer currently contains, so I can create a new mixed buffer to "punch in"?)
Thanks for any help, ladies and gentlemen
Jim