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

Midi in #699

Merged
merged 10 commits into from
Sep 28, 2023
Merged

Midi in #699

merged 10 commits into from
Sep 28, 2023

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Sep 14, 2023

allows using midi cc to control a mutable variable that itself is a pattern!

example:

let apc = await midin('APC MINI')
  
n(run(apc(54).range(1,12).round()))
  .chord("<Cm D>/8")
  .jux(rev)
  .offset(apc(55).range(-10,4).round())
  .voicing()
  .add(note(apc(48).range(0,12)))
  .lpf(apc(49).range(200,2000))
  .clip(apc(50).range(0.01,4))
  .room(apc(51).range(0,2))
  .delay(apc(52).range(0,1))
  .sometimesBy(apc(53), add(note(12)))
  .piano()

maybe note input would also be a good fit here

demo: https://www.youtube.com/watch?v=e2-Sv_jjDQk

another, minimal example:

let cc = await midin('APC MINI')
s("hh*8").speed(cc(48).range(.5,1))

this will allow you midi device to control the hihat speed between .5 and 1

@felixroos felixroos merged commit 8a74195 into main Sep 28, 2023
2 checks passed
@felixroos felixroos deleted the midi-in branch September 28, 2023 09:03
@felixroos felixroos mentioned this pull request Nov 6, 2023
@felixroos felixroos mentioned this pull request Mar 7, 2024
@maximeborges
Copy link

maximeborges commented Nov 20, 2024

Is this still supposed to work I'm getting a bunch of JS errors in the console with the following code based on your minimal example (for an APC Mini MK2, but also for a custom controller):

let cc = await midin('APC mini mk2')
s("hh*8").speed(cc(48).range(.5,1))
[query]: can't access property 48 of undefined 2 [index.CVox9G2w.js:7:5653](https://strudel.cc/_astro/index.CVox9G2w.js)
[query]: can't access property 48, y[c] is undefined

EDIT: nevermind, seems to be an issue on Firefox Developer Edition

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.

2 participants