iblrig.sound.make_sound
- iblrig.sound.make_sound(rate=44100, frequency=5000, duration=0.1, amplitude=1, fade=0.01, chans='L+TTL')[source]
Build sounds and save bin file for upload to soundcard or play via sounddevice lib.
- Parameters:
rate (int, optional) – sample rate of the soundcard use 96000 for Bpod, defaults to 44100 for soundcard
frequency (int, optional) – (Hz) of the tone, if -1 will create uniform random white noise, defaults to 10000
duration (float, optional) –
of sound, defaults to 0.1
amplitude (intor float, optional) – E[0, 1] of the sound 1=max 0=min, defaults to 1
fade (float, optional) –
time of fading window rise and decay, defaults to 0.01
chans (str, optional) – [‘mono’, ‘L’, ‘R’, ‘stereo’, ‘L+TTL’, ‘TTL+R’] number of sound channels and type of output, defaults to ‘L+TTL’
- Returns:
streo sound from mono definitions
- Return type:
np.ndarray with shape (Nsamples, 2)