Skip to main content

AI-powered Virtual Percussion with DataGloves for virtual drivers OS

Project description


📖 LionsMapperAI AirDrums – Manual de Funções

This document explains the functions and usage of the LionsMapperAI AirDrums library. It covers glove/foot calibration, drum axis mapping, WAV assignment, and the methods for playing and detecting drum interactions.


🎛️ Setup Functions

1. set_dataglove(side='LEFT', rgb='255,255,255')

Defines the DataGlove color calibration.

  • LEFT glove (default): rgb='255,255,255'
  • RIGHT glove: rgb='0,0,0'
set_dataglove(side='LEFT', rgb='255,255,255')
set_dataglove(side='RIGHT', rgb='0,0,0')

2. set_foot_glove(side='LEFT', rgb='110,110,110')

Defines the FootGlove (shoe sensor) color calibration.

  • LEFT shoe: rgb='110,110,110'
  • RIGHT shoe: rgb='80,80,80'
set_foot_glove(side='LEFT', rgb='110,110,110')
set_foot_glove(side='RIGHT', rgb='80,80,80')

🥁 Drum Mapping Functions

3. set_drums_axis(_hihats, _crash_cymbal, _ride_cymbal, _snare_drum, _high_tom, _mid_tom, _floor_tom, _bass_drum)

Defines the coordinates (x,y) for each drum element in the AirDrums environment. Typically values are initialized at 0 or 0.0 until calibrated.

set_drums_axis(
    _hihats=(0,0),
    _crash_cymbal=(0,0),
    _ride_cymbal=(0,0),
    _snare_drum=(0,0),
    _high_tom=(0,0),
    _mid_tom=(0,0),
    _floor_tom=(0,0),
    _bass_drum=(0,0)
)

4. set_drums_wav(...)

Defines the audio WAV files for each drum piece.

set_drums_wav(
    wav_hihats="hihats.wav",
    wav_crash_cymbal="crash_cymbal.wav",
    wav_ride_cymbal="ride_cymbal.wav",
    wav_snare_drum="snare_drum.wav",
    wav_high_tom="high_tom.wav",
    wav_mid_tom="mid_tom.wav",
    wav_floor_tom="floor_tom.wav",
    wav_bass_drum="bass_drum.wav"
)

🎵 Playback & Collision Detection

5. play_drums(index, lenght_time)

  • Detects collisions between DataGloves / FootGloves and the drum boxes.
  • Plays the drum sound accordingly.
play_drums(index=1, lenght_time=5)

6. get_play(step_time=2)

  • Defines the step time for checking collisions and playing sounds.
  • Calls get_play_box() internally.
get_play(step_time=2)

7. get_play_box(_data_axis, type)

  • Plays the .wav drum sound according to the detected drum box.
  • _data_axis: coordinates of the glove/foot detection.
  • type: drum element type (e.g., "snare_drum", "hihats", etc.).
get_play_box(_data_axis=(0,0), type="snare_drum")

✅ Summary

Function Description
set_dataglove() Defines RGB calibration for gloves
set_foot_glove() Defines RGB calibration for shoes
set_drums_axis() Defines drum coordinates
set_drums_wav() Assigns WAV files to drum pieces
play_drums() Detects collisions and triggers sound
get_play() Manages timed play cycles
get_play_box() Plays specific drum sound based on collision

Project details


Release history Release notifications | RSS feed

This version

8.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lionsmapper_airdrums-8.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lionsmapper_airdrums-8.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file lionsmapper_airdrums-8.0.tar.gz.

File metadata

  • Download URL: lionsmapper_airdrums-8.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for lionsmapper_airdrums-8.0.tar.gz
Algorithm Hash digest
SHA256 28911a31b02a4762ba5a9a099c8fda91a667d2ebdbbc13bfa7448c272e1fa29d
MD5 618f9f4c541894bcaa3382fc758f5af6
BLAKE2b-256 cbad64f69c38d21123707e67fb26c6b91a27de9630f6e2f396a2b19ed3f80a7a

See more details on using hashes here.

File details

Details for the file lionsmapper_airdrums-8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lionsmapper_airdrums-8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f07a9b97bda1dd9807d524d50b115496c67812798b1640d0ab67f6e89dbaea
MD5 fabb6220808254876f1e8f9f854eeb3f
BLAKE2b-256 af3577ba5adecdb28cd74d38864d8f5468d85ebd42b5b0476e408d4607c54f60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page