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

Express envelope duration as relative division instead of milliseconds? #15

Closed
tmhglnd opened this issue Feb 27, 2020 · 3 comments
Closed
Labels
enhancement New feature or request question Further information is requested

Comments

@tmhglnd
Copy link
Owner

tmhglnd commented Feb 27, 2020

Having a way of expressing the duration of envelopes,shape()-method, in relative divisions can give a better feel for how long a sound will last over time, and also gives the possibility to change the tempo of the piece and stretching/shrinking the envelope with it.

example

set tempo 100
new synth saw note(0 2) shape(1/16 1/4 1) time(2)
//=> is similar to: shape(150 600 2400)
set tempo 140
new synth saw note(0 2) shape(1/16 1/4 1) time(2)
//=> is similar to: shape(107 429 1714)

Questions:

  • should setting the envelope in milliseconds still be possible?
  • should this be a different function?
  • should an extra argument make sure if it chooses between ms or timevalue?
@tmhglnd tmhglnd added enhancement New feature or request question Further information is requested labels Feb 27, 2020
@tmhglnd
Copy link
Owner Author

tmhglnd commented May 9, 2020

Instead of being able to add divisions in this method you can, since commit 86d9f03, convert division values to milliseconds with the divisionToMs() method

@tmhglnd tmhglnd closed this as completed May 9, 2020
@tmhglnd
Copy link
Owner Author

tmhglnd commented May 13, 2020

Include the possibility to add the division value as argument directly into shape()

@tmhglnd tmhglnd reopened this May 13, 2020
@tmhglnd
Copy link
Owner Author

tmhglnd commented May 13, 2020

Updated in 51041cf, added option to specify attack, decay and release times for shape() in division values. For full bars a division is still needed, so 1 bar would be equal to 1/1 and 3 bars to 3/1

example

set tempo 100

new synth saw note(0 0) time(1/2) shape(1 1/2) 
new synth saw note(0 2) time(1/2) shape(1/4 1/64) 

@tmhglnd tmhglnd closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant