Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Device Motion module #1217

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

nkymut
Copy link

@nkymut nkymut commented Nov 21, 2024

This change adds 'motion' package, which introduces smartphone's acceleration, gravity, rotation, and orientation signals for dynamic pattern creation in Strudel.

example:

enableMotion() //enable DeviceMotion 

let tempo = 200

$_: accX.segment(16).gain().log()

$:n("[0 1 3 1 5 4]/4")
  .scale("Bb:lydian")
  .sometimesBy(0.5,sub(note(12)))
  .lpf(gravityY.range(20,1000))
  .lpq(gravityZ.range(1,30))
  .lpenv(gravityX.range(2,2))
  .gain(oriX.range(0.2,0.8))
  .room(oriZ.range(0,0.5))
  .attack(oriY.range(0,0.3))
  .delay(rotG.range(0,1))
  .decay(rotA.range(0,1))
  .attack(rotB.range(0,0.1))
  .sound("sawtooth").cpm(tempo)

as discussed in
https://discord.com/channels/779427371270275082/1308356687538683958/1308731644097728514

Tested only on the iPhone 13 Pro; testing on Android devices is still required.

Introduces smart-phone device's acceleration, gravity, rotation, and orientation signals for dynamic pattern creation in Strudel.
@nkymut nkymut changed the title Add Device Motion package Add Device Motion module Nov 21, 2024
- updated evalScope for vtest to access devicemotion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant