Hello Christoph,
Andrew, (or anybody else): do you have some simple visionegg codeHere is a very simple code using only pygame. The filenames are stored in the "stims" variable, but they could be read from a text file.
available, which you could send me?
import os.path import pygame.mixer, pygame.time mixer = pygame.mixer time = pygame.time
#choose a desired audio format mixer.init(16000)
stims=""" tone0064.wav tone0128.wav tone0256.wav tone0512.wav tone1024.wav tone2048.wav tone4096.wav tone8192.wav """
def play(file): file = os.path.join(stimpath,file); sound=mixer.Sound(file) channel=sound.play() while channel.get_busy(): time.wait(10)
start=time.get_ticks() SOA=2000 n=0
for i in stims.split(): n=n+1 while time.get_ticks()-start > n*SOA: time.delay(10) print "playing %s" % i if i: play(i)
====================================== The Vision Egg mailing list Archives: //www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html