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

LinLog function? #1555

Closed
ceremona opened this issue Jun 22, 2015 · 2 comments
Closed

LinLog function? #1555

ceremona opened this issue Jun 22, 2015 · 2 comments
Milestone

Comments

@ceremona
Copy link

Sorry if this is the wrong place to ask this but... I am amazed to find that there is no logarithmic input mapping function such as LinLog. Am i missing something? LinExp only allows for exponential mapping. How would someone do this other than writing there own math function?

@ceremona
Copy link
Author

Ok, I guess nevermind. I can do what I want with simple math functions, which I guess begs the question, why there is a separate function for these mappings at all, when you can just run your input values through a one-line function?

.log, etc...

@danstowell
Copy link
Member

.linexp and similar are used to map a range to a range. For example input 0-1 to be mapped to exponential range 1-10? No problem: x.linexp(0, 1, 1, 10). Don't worry about the constants needed to calculate that. It means you can think like an audio engineer rather than a mathematician. (You might find that .explin answers your original question, perhaps.)

If you want to think like a mathematician, use .log .exp and so on, no problem. SuperCollider likes mathematics and audio engineering.

@scztt scztt added this to the future milestone Jun 27, 2015
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

3 participants