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

Merged
merged 11 commits into from
Jan 31, 2025
Merged

Add Device Motion module #1217

merged 11 commits into from
Jan 31, 2025

Conversation

nkymut
Copy link
Contributor

@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
@felixroos
Copy link
Collaborator

sorry for not looking at this for so long.. thank you for the PR ! the code looks good, tho it seems the PR is now mixed with #1223 ?
i can test this on android as well..
it might also be useful to have a little guide in the docs so people can discover this feature

@nkymut
Copy link
Contributor Author

nkymut commented Dec 17, 2024

Oops, I didn’t realise I had mixed this up with other updates I was testing.
I’ll try to roll back the commits where I published the PR and am also looking into the guide for the module.

@felixroos
Copy link
Collaborator

this also ready for merge?

minor edit on SSL installation procedure
@nkymut
Copy link
Contributor Author

nkymut commented Jan 17, 2025

I have added minor details to the local SSL configuration steps,
and apart from that, I have nothing else to add on my end.

@felixroos
Copy link
Collaborator

same here, i'll test this soon :) thanks for your work

@felixroos felixroos added the v1.2 label Jan 24, 2025
@felixroos
Copy link
Collaborator

i've fixed / tweaked some things, now it should be ready to go

@yaxu
Copy link
Member

yaxu commented Jan 31, 2025

Oh wow this looks awesome

@felixroos felixroos merged commit f26a2af into tidalcycles:main Jan 31, 2025
1 check passed
@felixroos
Copy link
Collaborator

now deployed! tested it with android and it works! (without permission request for some reason)

@felixroos
Copy link
Collaborator

thanks again @nkymut !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants