Skip to content

Commit

Permalink
fix typo and add code-block
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Oct 2, 2024
1 parent 60c2ca8 commit a3209d5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tutorials/40_sychronize_sound_and_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,22 @@
# .. image:: ../../_static/performance.png
# :align: center
#
# On different computers with different soundards, the performance may vary. For
# On different computers with different soundcards, the performance may vary. For
# instance, with on-board soundcards on Linux, both psychtoolbox and stimuli are usually
# perfectly synchronized with the trigger. In the end, the performance should always be
# measured on the target system.
#
# .. code-block:: python
#
# from stimuli.audio import Tone
# from stimuli.time import sleep
# from stimuli.trigger import ParallelPortTrigger
#
# sound = Tone(frequency=440, volume=100, duration=0.3)
# trigger = ParallelPortTrigger("/dev/parport0")
#
# for k in range(10):
# sound.play(when=0.2)
# sleep(0.2)
# trigger.signal(1)
# sleep(0.5)

0 comments on commit a3209d5

Please sign in to comment.