Skip to content

Commit d37f1a4

Browse files
committed
add channel configuration
1 parent 5c8577d commit d37f1a4

File tree

1 file changed

+10
-1
lines changed
  • iblrig_custom_tasks/samuel_tonotopicMapping

1 file changed

+10
-1
lines changed

iblrig_custom_tasks/samuel_tonotopicMapping/task.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ def __init__(self, *args, **kwargs):
7171
self.repetitions.append(min(max_reps_per_trial, reps_remaining))
7272
reps_remaining -= self.repetitions[-1]
7373

74+
# select channel configuration for playback
75+
match self.hardware_settings.device_sound.DEFAULT_CHANNELS:
76+
case 'left':
77+
channels = 'right'
78+
case 'right':
79+
channels = 'left'
80+
case _:
81+
channels = 'stereo'
82+
7483
# generate stimuli
7584
self.stimuli = []
7685
for idx, f in enumerate(self.frequencies):
@@ -80,7 +89,7 @@ def __init__(self, *args, **kwargs):
8089
duration=self.task_params['d_sound'],
8190
amplitude=self.task_params['amplitude'],
8291
fade=self.task_params['d_ramp'],
83-
chans='stereo',
92+
chans=channels,
8493
gain_db=self.attenuation[idx],
8594
)
8695
self.stimuli.append(tmp)

0 commit comments

Comments
 (0)