Hi Jaewon,
I am trying to use the new ML to present sequences of sounds within a single trial. Following an earlier post on this forum we use rewind_sound, but ran into some unexpected behavior on our platform.
In a nutshell, the rewind_sound command has two un-intended consequences on our platform. In certain settings it crashes Matlab hard without any error message, in other settings it changes the duration of the tones played. I have attached a series of timing files that re-creates the different outcomes on our end.
The test_sine_cnd.txt file specifies five 50 ms sine tones. By default it calls the timing file test.m. (To test the three timing files attached here please edit the name accordingly.)
All of the timing files are set up to play 5 tones with an inter-stimulus interval of 300 ms. They differ with respect to whether the same tone is repeated 5 times, or a new tones is played at each instance. And they differ with respect to whether rewind_sound is called or not.
The first example timing file (test_noRewind_sameTone_omissions.m) requests the same sound 5 times and does not use rewind_sound. This has the anticipated effect of dropping tones. (However, somewhat unexpectedly to me it plays the sound twice, instead of just once.)
The second example timing file (test_rewindAll_sameTone_differentToneDuration.m) uses "rewind_sound(n)" after each presentation. This leads to the presentation of all 5 instances, but the duration of instances 2 and 4 are noticeably longer than instances 1,3 and 5.
The third timing file (test_rewindAll_differentTones_crash) requests a different tone each time and rewinds after each presentation. This crashes the program after all 5 tones have been presented. The crash always happens after all tones have been played, regardless of their order or number of presentations. In some, but not all, instances we have been able to avoid the crash by not rewinding the very last sound.
We have also noticed that on our platform the command rewind_sound without arguments in brackets (i.e., "rewind_sound" instead of "rewind_sound(n)" ) reliably crashes matlab the first time it is called. Adding a second argument to the brackets ("rewind_sound(n,0)") did not have any effect on the different durations that we observed with timing file test_rewindAll_sameTone_differentToneDuration.m.
A couple of details about the setup: we use matlab 2020a on a new dell windows 10 machine. We have observed these outcomes using two different sound-cards, one of them an internal sound-card from M-Audio, the other one an external usb sound-card from focusrite.
Any help or suggestions are greatly appreciated :-)
Cheers,
Tobias
Attachments:
open |
download -
testSine_cnd.txt
(211 bytes)
open |
download -
test_noRewind_SameTone_omissions.m
(1 KB)
open |
download -
test_rewindAll_sameTone_differentToneDurations.m
(1 KB)
open |
download -
test_rewindAll_differentTones_crash.m
(1 KB)