art project 4 vibes room
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
dynamicsound.py

README.md

Dynamic Sound

  1. init
  • capture from cam
  • play 4 sounds
  1. while 1
  • query frame (from cam)
  • sub: image(t) - image(t-10) = moved
  • weight each 4 quart of the frame (0.0 < weight < 1.0)
    • moved / 4 quarter images -> sum each quarter px -> % -> volume
  • apply weight as channel volume

youtube

sudo apt-get install python-opencv python-pygame


API usage: 0.0 < weight < 1.0

DynamicSound.weight = {
    "up": {
        "left": 0,
        "right": 0
    },
    "down": {
        "left": 0,
        "right": 0
    }
}