Creating an isochronous beat

22 views
Skip to first unread message

wimartin

unread,
Apr 1, 2013, 2:16:58 PM4/1/13
to psychop...@googlegroups.com

Hi everyone,

I'm trying to do something that should be relatively simple to do in Psychopy: create an isochronous beat, at around 400ms inter-tone-interval.  I have a single audio tone file, which I call into Psychopy, then specify to loop at a particular duration for a specified number of trials ("beats").  However, when I play this, there are substantial deviations in the inter-tone-interval, such that the rhythm does not sound regular at all and deviations from isochrony are readily apparent.  I'm aware that timing slips happen, but these seem to be unusually large.  Creating the entire rhythm offline is not an option, as I want to adjust the ITI adaptively within the session.  I've tried placing all of the beats within a single trial, rather than a loop, and playing them sequentially, but the deviations persist.  I'm using 1.76 Builder on Mac OSX. 

Has anyone else here created a simple beat in Psychopy and found this to be, or not to be the case?

~Martin W.  

      

Jeremy Gray

unread,
Apr 1, 2013, 3:27:53 PM4/1/13
to psychop...@googlegroups.com
Hi Martin,

Are you using pyo for sound? (see preferences > general > audioLib.) I
mocked up an example, and it sounds pretty reasonable to me using
1.76, on mac 10.8, using pyo. Caveat: I have absolutely zero musical
training.

I made a routine with a default sound (onset 0.0, duration 0.1s, and a
text stim which displays a space (i.e., nothing) for 0.4s. I enclosed
this routine in a loop, for 20 iterations. The short tone is generated
by psychopy, not read in from a file, but I think that should not
matter much). 0.4s is the ITI, and using a variable should work there
just fine.

This is pretty quick and dirty, and timing might be off by 16.67ms.
Using code to interface with pyo directly you should be able to get
very precise control over the sound, in ways that are not possible
(yet?) through the Builder interface.

--Jeremy
> --
> You received this message because you are subscribed to the Google Groups
> "psychopy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to psychopy-user...@googlegroups.com.
> To post to this group, send email to psychop...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/psychopy-users/-/rjV3gQS-OPMJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

wimartin

unread,
Apr 1, 2013, 4:43:06 PM4/1/13
to psychop...@googlegroups.com

Hi Jeremy,

Thanks for the response.  I switched to using pyo for sound and the results come out much much better.  This was the simple fix I was hoping for!

Best,

~Martin
Reply all
Reply to author
Forward
0 new messages