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

adsr - Hold a note in Live Coding Environement? #175

Open
micoloth opened this issue Jul 23, 2024 · 5 comments
Open

adsr - Hold a note in Live Coding Environement? #175

micoloth opened this issue Jul 23, 2024 · 5 comments

Comments

@micoloth
Copy link

Hello

First of all- What an amazing project!

I like it very much, I want to learn it and possibly even contribute to it in the future.

As first issue.. I have not been able to use the ADSR node. (also it's not documented, and I haven't found any example).

Could you provide an example of a code that produces sound?

(Eg this one doesn't
~env: imp 1.0 >> adsr 1 10 10 1
o: sin 200 >> mul ~env >> mul 50
)

Thank you very much!

@chaosprint
Copy link
Owner

Hello

First of all- What an amazing project!

I like it very much, I want to learn it and possibly even contribute to it in the future.

As first issue.. I have not been able to use the ADSR node. (also it's not documented, and I haven't found any example).

Could you provide an example of a code that produces sound?

(Eg this one doesn't ~env: imp 1.0 >> adsr 1 10 10 1 o: sin 200 >> mul ~env >> mul 50 )

Thank you very much!

the adsr node is designed for glicol-js mainly and we usually don't use it for live coding.

adsr example can be found here: https://glicol.js.org/adsr.html

in live coding, envperc is enough for most cases: https://glicol.org/tour#envelope

@micoloth
Copy link
Author

Hi chaosprint 👋

Thank you for your answer!

Would you be interested if I opened a PR to expose the adsr to the Live Coding Environement as well?

(I would add all the pieces, such as docs, parsing rules, etc)

I would gladly do it, also it would be good for me to learn how Glicol's internals work.

Or are you rather not considering PRs right now?

In any case, thank you for your work

@micoloth
Copy link
Author

micoloth commented Jul 25, 2024

Ah..
Followup

I have seen your example https://glicol.js.org/adsr.html
I understand now how adsr works with ConstSig:

  • Turn on sig: trigger Attack
  • Turn off sig: trigger Release

I wonder, Does this mean that there is no way in Live Coding Environement to hold a note for a given interval?
Also seq only produces impulses..

Again, are you thinking about/ would you be interested in adding support for this use case in some form?

@micoloth micoloth changed the title adsr example? adsr - Hold a note in Live Coding Environement? Jul 27, 2024
@chaosprint
Copy link
Owner

Ah.. Followup

I have seen your example https://glicol.js.org/adsr.html I understand now how adsr works with ConstSig:

  • Turn on sig: trigger Attack
  • Turn off sig: trigger Release

I wonder, Does this mean that there is no way in Live Coding Environement to hold a note for a given interval? Also seq only produces impulses..

Again, are you thinking about/ would you be interested in adding support for this use case in some form?

There is a point node that may be able to do this with seq. But as you said, I need to improve the documentation. The new website is already under development.

@micoloth
Copy link
Author

micoloth commented Aug 1, 2024

Ah Cool!

I didn't know about the Points node.

I have figured out how it works:

~note: [0.01 => 0.25 0.02 => 0.] !
means: after 0.01 bar raise to 0.25 volume. And at 0.02 bar go down to 0 again. Right?

The only thing I'm missing now is how to use it- what are the input and outputs.

I've tried modulating some Quarter or 16th notes like this:

~note: [0. => 1.  1/16 => 0.  2/4 => 0.  9/16 => 0.] ! 
~ampenvsynth: ~note >> adsr 0.01 0.3 1. 0.01
melody_out: sin 220 >> mul ~ampenvsynth

beat: seq 33 _ 33 _ >> trisynth 0.01 0.1  >> mul 50

But it doesn't work exactly as I expected, eg the duration appears to always be one half beat.

Am I using it wrong ?

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

No branches or pull requests

2 participants