Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: Combining image, sound and TTL

  1. #1
    Join Date
    Apr 2007
    Posts
    10

    Combining image, sound and TTL

    I am having trouble setting up the following in direct RT:
    1. An image displays on the screen for 6 seconds; the moment the image is displayed, a TTL signal is sent
    2. During the 6 seconds the image is displayed, a 50 ms white noise plays once, at a random position during those 6 seconds
    3. Concomitantly with the start of the white noise playing, another TTL signal is sent (it has to be in sync with the start of the white noise).
    Is something like this possible in DirectRT?

    Thanks!
    Last edited by jarvis24; 04-26-2007 at 06:08 AM.

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    Interesting--normally it's tough to time events within the fixed timing of other events, but this might work. Take a look at the attached revision of the standard sendTTL sample. The work-around is to create multiple versions of your white noise file--each with variable onset delays (e.g., 1 sec initial of silence, 2sec, 3sec, etc.). That way you can use compound screens to achieve the six total seconds. To achieve randomness, you can then simply randomize the trials. Anyways try it out and let me know if this is in the ballpark.

    -Blair
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2005
    Posts
    3,328
    [edited from a related support email]

    I have programmed an experiment in which we show participants a series of muted video clips. Some of the videos are paired with a startle sound that is meant to scare the participants a bit. The videos are in AVI format and are playing fine. The startle sound is a windows media sound file, and is also played without a problem by DirectRT.

    Unfortunately I have stumbled into a problem. As soon as the startle sound file plays, the movie stops playing. This is a problem because I want to play the startle sound at different points. For instance, for a 9 second video, sometimes the startle will come at the 5th second, for other participants it may come at the 6th or 7th, but the movie should continue playing after the startle sound (which is very brief, about 500 miliseconds). How could I bypass this problem? Is it because directRT uses Windows media to play the movie and the sound files? Any help would be greatly appreciated.
    You may be able to do this by playing the sound first if you create multiple versions of the sound file--each with varying lengths of silence to start, and with time values of "0,0,0" so there is no delay between the onset of the sound file and of the video. See if the response and sample above help.
    Last edited by jarvis24; 04-26-2007 at 06:14 AM.

  4. #4
    Join Date
    Apr 2007
    Posts
    10

    This worked

    The file you sent did the trick. Thank you! Mugur

    Quote Originally Posted by jarvis24 View Post
    Interesting--normally it's tough to time events within the fixed timing of other events, but this might work. Take a look at the attached revision of the standard sendTTL sample. The work-around is to create multiple versions of your white noise file--each with variable onset delays (e.g., 1 sec initial of silence, 2sec, 3sec, etc.). That way you can use compound screens to achieve the six total seconds. To achieve randomness, you can then simply randomize the trials. Anyways try it out and let me know if this is in the ballpark.

    -Blair

Similar Threads

  1. Sound but no video
    By shendric in forum MediaLab Older Versions: Troubleshooting
    Replies: 5
    Last Post: 11-04-2009, 09:40 PM
  2. playing background sound
    By wuerth in forum DirectRT Older Versions: Troubleshooting
    Replies: 1
    Last Post: 02-05-2007, 01:33 PM
  3. TTL signal to Biopac
    By XeniasD in forum MediaLab Older Versions: Troubleshooting
    Replies: 1
    Last Post: 12-15-2006, 02:26 PM
  4. TTL signal to Biopac
    By XeniasD in forum Hardware: Troubleshooting
    Replies: 1
    Last Post: 12-15-2006, 02:26 PM
  5. Name of image appears instead of actual image
    By jarvis24 in forum DirectRT Older Versions: Troubleshooting
    Replies: 1
    Last Post: 10-10-2006, 02:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •