Skip to content

Arena with two distinct chambers, each associated to a background sound. Play sound when the mouse enters either chamber.

Notifications You must be signed in to change notification settings

lachioma/bonsai_arena_2chambers_2sounds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bonsai_arena_2chambers_2sounds

Arena with two distinct chambers, each associated to a distinct background sound. Play the background sound when the mouse is inside either chamber.

The two chambers are defined as separate ROIs using the CropPolygon node. When the mouse enters the ROI, the average brightness of the ROI decreases. When the average brightness drops below a threshold (manually set in the LessThan node), the sound playback is triggered. The playback is repeated in loop until the brightness goes back above the threshold (== mouse exits the ROI).

DistinctUntilChanged node makes propagate the signal only when there is a change, so either a rising edge (0->1) or falling edge (1->0). The distinction between the two edges is then done by the isTrue and isFalse conditions.

image

About

Arena with two distinct chambers, each associated to a background sound. Play sound when the mouse enters either chamber.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published