OpenLearnr icon indicating copy to clipboard operation
OpenLearnr copied to clipboard

build(deps): bump maven-enforcer-plugin from 3.0.0-M3 to 3.1.0

Open dependabot[bot] opened this issue 2 years ago • 0 comments

Bumps maven-enforcer-plugin from 3.0.0-M3 to 3.1.0.

Release notes

Sourced from maven-enforcer-plugin's releases.

3.1.0

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

📝 Documentation updates

... (truncated)

Commits
  • 543e46f [maven-release-plugin] prepare release enforcer-3.1.0
  • 02d4036 [maven-release-plugin] prepare for next development iteration
  • e3475ec [maven-release-plugin] prepare release enforcer-3.0.1
  • 588e3d0 Add MojoHaus - Extra Enforcer Rules to third party
  • 7c026fa Bump mockito.version from 4.6.0 to 4.6.1
  • 07257fb Remove always updates policy for snapshot from mock repository
  • 827e806 Remove always updates policy for snapshot from mock repository
  • 8cca653 Add release-drafter
  • fa8f7f2 [MENFORCER-389] Allow filtering of parent in requireReleaseDeps
  • fd574ec Bump assertj-core from 3.23.0 to 3.23.1
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Jun 13 '22 05:06 dependabot[bot]

Just thought I'd share the technique I used to handle releases in my ADSRs.

When I evaluate the ADSR at time t(in samples), if Some(tr) <= t (that is time of release <= t_now), then I calculate the curve¹ from level to 0.0 where level is established with a recursive call into the ADSR function with the same arguments, but with tr=None and t=t_release for the release phase. This snapshots the amplitude from t=t_release without using state. This way the release always descends from the correct level.

(Since I'm using floats, I could have used infinity instead of Option, still considering it to avoid the match.)

¹ using the same curves you do, I cribbed off this project to implement them because mine were klunky. ;)

I switched my project to OCaml because DSP is all math and OCaml makes that easy (and super composable.) I may port it back to Rust when I have it working. Anyway, hopefully you can get the gist of it. This code isn't quite finished, but it does the job:

let rec adsr ?(curves=(0.,0.,0.)) at dt sl rt =
    let (ac, dc, rc) = curves in
    fun tr t ->
        let mul = match tr with
        | Some tr ->                                            (* release case *)
                let self = adsr ~curves:curves at dt sl rt in   (* get a copy of this ADSR *)
                let delt = t -. tr in                           (* delt = t_now - t_release *)
                if delt < 0. then self None t                   (* relase is in the future; evaluate up to t_now without release *)
                else if delt > rt then 0.                       (* release is over, output 0.0 *)
                else 
                    let level = self None tr in
                    curve rc level 0. (delt /. rt)              (* compute the curve *)
        | None ->
                if t < at then curve ac 0. 1. (t /. at)
                else if t < dt +. at
                then
                    let delt = t -. at in
                    curve dc 1. sl (delt /. dt)
                else sl
        in mul

Some plots with curves=(1.0,1.0,1.0) and varying t_release to test the different phases:

Release during sustain: adsr_1

Release during decay: adsr_2

Release during attack: adsr_3

Looking at that last plot I just realized there's a bug. The falloff isn't immediately exponential. (Frustratingly, the previous version I wrote accounted for this and did it right.) Anyway, I updated the code above and here's a new plot:

adsr_4

I hope this helps if you need any help for the design. You might want to consider state instead for performance. I didn't bother because I would have to recurse the first time anyway to create the state and this thing is aready running quite fast even when supersampled at 16x and with a dumb plotting frontend attached to it.

There is a foible. The function blindly returns a value when the release is over so there's no indication that the note is finished. I thought about making it an Option, but instead I plan to track the detla in the voice logic and let it work out the logic. It probably makes more sense to blindly mix the voice output into the stream even after release for the remainder of the chunk and then deallocate it after the chunk is processed instead of checking at each sample.

Peace.

smosher avatar Mar 05 '15 04:03 smosher

Thanks a lot for this! Will have a proper read through it soon :+1:

mitchmindtree avatar Mar 05 '15 05:03 mitchmindtree

Np. And yeah... sorry about the length. When I started I didn't think I'd go on so much.

smosher avatar Mar 05 '15 07:03 smosher

@smosher Impressive!

bvssvni avatar Mar 05 '15 12:03 bvssvni