Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sounds fades away in ssaep experiments #66

Open
danielemarinazzo opened this issue Dec 14, 2020 · 10 comments
Open

sounds fades away in ssaep experiments #66

danielemarinazzo opened this issue Dec 14, 2020 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@danielemarinazzo
Copy link
Contributor

Hi

in both ssaep experiments the sounds fades away after a few instances, becoming barely audible.
maybe it's my perception but it's somehow less evident in the two frequencies one (4a), but still very real.

@danielemarinazzo
Copy link
Contributor Author

update, it works now, I installed manually pyo and pygame, and put one of these two as default

PTB still gave an error

self.stopTime = self._nSamples / float(self.sampleRate) TypeError: float() argument must be a string or a number, not 'NoneType'

I also changed the output sound from "native sound" or something like that, to another option, with four capital letters.

Why am I not being more specific? Because now psychopy gives an error when I try to access the preferences :)

Traceback (most recent call last):
  File "c:\users\daniele\miniconda3\envs\eegnb_py37\lib\site-packages\psychopy\app\_psychopyApp.py", line 767, in showPrefs
    prefsDlg = PreferencesDlg(app=self)
  File "c:\users\daniele\miniconda3\envs\eegnb_py37\lib\site-packages\psychopy\app\preferencesDlg.py", line 543, in __init__
    devnames = sorted(sound.getDevices('output'))
AttributeError: module 'psychopy.sound' has no attribute 'getDevices'

But as long as the sound works, I won't touch it :)

@JohnGriffiths
Copy link
Collaborator

JohnGriffiths commented Feb 20, 2021

@danielemarinazzo - try changing the SOA ( = the trial duration ).

Tried this just now.

With SOA <= 1 I get the volume dropoff, and it's worse for e.g. SOA=0.5

At SOA = 2.0 I didn't hear any volume dropoff over 1 min.


Also note here: you could set longer SOAs and have fewer, longer trials. That would remove the unfortunate clicks that accompany the stim onset offset (which also needs fixing).

Since you set ITI to zero for your ssaep_onefreq experiment, I guess what you are after is a single continuous sound stream.

Note that there might be advantages to having delineated trials at later points for averaging etc; my first thought would be maybe 30s trials, for a 5-10 min expt.

@JohnGriffiths
Copy link
Collaborator

Ok sorry it still fades out for longer runs. So must be to do with the number of repeats.

@JohnGriffiths
Copy link
Collaborator

Still, with 30s trials you should have no issues...

@JohnGriffiths
Copy link
Collaborator

Ok, have a better fix: move the sound object creation inside the trials loop. No fading with this. Doing PR now.

@JohnGriffiths
Copy link
Collaborator

Here #81

@danielemarinazzo
Copy link
Contributor Author

thanks a lot! what do you have as psychopy sound preferences? Because for me what resolved the issue was to install pyo and pygame nad change the audio type in psychopy.

btw do you manage to use PTB as primary sound preference?

@JohnGriffiths JohnGriffiths self-assigned this Mar 19, 2021
@JohnGriffiths JohnGriffiths added the bug Something isn't working label Mar 19, 2021
@JohnGriffiths JohnGriffiths added this to To do in EEG-Notebooks Project Board via automation Mar 19, 2021
@JohnGriffiths JohnGriffiths added this to the q2-2021 milestone Mar 19, 2021
@JohnGriffiths JohnGriffiths moved this from To do to In progress in EEG-Notebooks Project Board Mar 19, 2021
@JohnGriffiths
Copy link
Collaborator

@danielemarinazzo - checking in on this one also. Are you still encountering this error?

@JohnGriffiths JohnGriffiths moved this from In progress to On Hold in EEG-Notebooks Project Board Jun 16, 2022
@danielemarinazzo
Copy link
Contributor Author

Last time I checked was in April, with a fresh installation of the toolbox at that time, on a different PC (still windows, still python 3.7). Now I cannot check since my new installation does not work

@danielemarinazzo
Copy link
Contributor Author

So the installation works now, and the sound does not fade. I cannot check if it's PTB or else since when I run the psychopy command it does not start. Any ideas? In any case it works and psychopy does not complain about using the wrong sound options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants