carrien / free-speech

Analysis and plotting code for speech neuroimaging experiments.
MIT License
4 stars 5 forks source link

P argument in audapter_runFrames #6

Closed Comeani closed 4 years ago

Comeani commented 4 years ago

Changes below to allow for a custom "p" parameter structure for running audapter on an existing signal. A use case I just had for this was needing to provide a different p.pertAmp to generate the noShift/shiftUp/shiftDown stimuli in the port speech perception experiment. I made the same change to check_audapterLPC as I did to audapter_runWav below, these were in a separate commit to current studies though. I'm realizing I messed up the order of operations a bit, as I should have done this first but you should be able to test these changes on check_audapterLPC and then we can do the move of experiment_helpers to free-speech.

cwnaber commented 4 years ago

Successfully ran through the first part of run_vsaAdapt2_expt in test mode. Ran it locally with the Scarlett. Was able to change LPCs at the checkLPC screen and the figures updated.

I did end up hitting an error (quoted below) shortly after, when I said "yes" to "is the perturbation field OK?". Nick said this might be unrelated. Maybe it's due to not having the 2D Audapter mex file added in run_vsaAdapt2_expt line 175?

Set deviceName to: Focusrite USB Set parameter datapb to: [0.0959473, 0.122864, 0.133575, ..., 0.316956] Error using Audapter ERROR: Input parameter is not a scalar or a row or column vector Error in AudapterIO (line 93) Audapter(3,'pertamp',p.pertAmp, toPrompt); Error in run_vsaAdapt_audapter (line 66) AudapterIO('init', p); Error in run_vsaAdapt2_expt (line 178) expt = run_vsaAdapt_audapter(expt,conds2run);

Comeani commented 4 years ago

It sounds like missing the 2D audapter mex file is the culprit there, the perturbation amplitude structure provided is a matrix rather than a vector as the intention in vsaAdapt2 is to apply different shifts at different points in F1/F2 space.

cwnaber commented 4 years ago

It sounds like missing the 2D audapter mex file is the culprit there, the perturbation amplitude structure provided is a matrix rather than a vector as the intention in vsaAdapt2 is to apply different shifts at different points in F1/F2 space.

Ok, fair enough.