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

Fade in / Fade out #1

Open
TwizzyDizzy opened this issue Nov 28, 2017 · 4 comments
Open

Fade in / Fade out #1

TwizzyDizzy opened this issue Nov 28, 2017 · 4 comments

Comments

@TwizzyDizzy
Copy link

Hi Helton,

do you think it would be possible to adjust noiseless in the following way:

When I klick an icon to enable it, just fade from zero to either the last value it had when it was deactivated (meaning if I have it on 33% and would disable it, it would - on enabling it again - fade from 0% to 33%).

Hope I made sense :)

Cheers
Thomas

@helton
Copy link
Owner

helton commented Dec 5, 2017

Hi, Thomas (@TwizzyDizzy)

Yeah, I understood what you meant. I think it's possible to do applying a css transition in opacity property (about 2 seconds of duration seems good) and change the opacity value to match the current slider value.
I'll look into it when I got time.
If you have any idea or want to send a PR, feel free to reach me out.

Cheers,
Helton

@TwizzyDizzy
Copy link
Author

I just re-read my issue and realized, that you could interpret everything I wrote as just "visual". I think you got it that way, as you refer to the visual opacity. Yet what I meant, was meant in an audible fashion. I meant the actual volume of the sample. :)

Unfortunately, I'm no JS/CSS guy - otherwise I'd directly done it as a PR.

Cheers
Thomas

@helton
Copy link
Owner

helton commented Dec 10, 2017

Hey, Thomas (@TwizzyDizzy)

Thanks for the clarification. I've made some changes in a branch fadein-fadeout in order to develop your request. Can you take a look at it?
There's a lot of room for improvement, by I think it's usable for now.

Here are some numbers you may find useful (all of them defined only by experiments):

  • fade interval: 3 seconds
  • fade iterations (more iterations, more smoothy the transition): 100
  • minimum opacity (from 0 to 1): 0.2

Any feedback is welcome!

Cheers,
Helton

@TwizzyDizzy
Copy link
Author

TwizzyDizzy commented Dec 10, 2017

Hi @helton!

first off: thanks for taking the time, it is appreciated :)

It basically works as I imagined it to work and the parameters you introduced are the ones one would like to fiddle with, if the default isn't to one's liking.

Some remarks:

  • if one adjusts MIN_OPACITY, I think this should reflect on the initial state of the buttons (maybe via DOM onload or sth.), shouldn't it? Default seems to be 0.2 ... if you set MIN_OPACITY to 0.05 and enable a switch it first jumps back to 0.05 in a hard way and then fades up to 1
  • by default, switching a sound on jumps to 50% loudness, yet to an opacity of 1 - from what I gather, your intention seemed to be to reflect the loudness in the opacity. Also, on changing the loudness, this doesn't reflect in opacity at all (this is nothing that bothers me, but I think is against your initial intention)

Other thing: the buttons "Relax", "Random" and "Productivity" don't do anything for me. It's the same on master branch, though, so I think this has nothing to do with fadein-fadeout branch.

BTW1: Heads up for the use of Subresource Integrity!
BTW2: Just another idea: was thinking about having one's own presets that are preserved over a reload. If this would be one thing you could imagine having in this tool, I could elaborate on that idea in a different issue (maybe just to have it there and to give interested parties to give a starting point for contribution).

Cheers & Thanks again
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants