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

midimaps #1274

Merged
merged 11 commits into from
Feb 7, 2025
Merged

midimaps #1274

merged 11 commits into from
Feb 7, 2025

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Feb 2, 2025

after discussion in #1212 this PR adds support for defining midimaps:

// defines a midimap for the given name
midmaps({
  miniv3: { 
    lpf: { ccn: 74, min:0, max:20000, exp:0.5 },
    gain: { ccn: 7, min:0, max:1 }
  }
})
// create helper function to use the midimap and the default midi device
register('miniv3', pat => pat.midimap('miniv3').midi())

// because it's midi, we can send stuff in parallel
$: note("[<g bb <d4!3 eb4>> -]*8").miniv3()
$: gain("<.25 .5 1>*8").miniv3()
$: lpf(sine.range(20,8000).slow(1)).segment(64).miniv3()

edit: i've also now added the function defaultmidimap which allows defining the default midimap:

defaultmidimap({
  lpf: { ccn: 74, min:0, max:20000, exp:0.5 },
  gain: { ccn: 7, min:0, max:1 }
})
$: note("[<g bb <d4!3 eb4>> -]*8").midi() // no need to set midimap control

todo:

  • doc
  • load from url
  • test
  • gather feedback

@felixroos felixroos marked this pull request as draft February 2, 2025 21:07
@felixroos felixroos added the v1.2 label Feb 3, 2025
@Bubobubobubobubo
Copy link
Contributor

It makes sense to also collect #1244 now, as it was attached to PR #1212. Other than that, very good design 😄.

@felixroos felixroos marked this pull request as ready for review February 6, 2025 12:49
@felixroos felixroos merged commit 5e81b54 into main Feb 7, 2025
2 checks passed
@felixroos felixroos deleted the midimaps branch February 7, 2025 10:07
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.

2 participants