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

Add docs #766

Merged
merged 5 commits into from
Oct 2, 2022
Merged

Add docs #766

merged 5 commits into from
Oct 2, 2022

Conversation

cjwit
Copy link
Contributor

@cjwit cjwit commented Oct 23, 2020

I added some detail to the documentation based on recent discussions in the Google Groups forum. This adds the HTML usage option to the main README file and adds some description and links between the Meter and DCMeter docs.

Related: is there a way to view the docs locally before pushing? Running nom run docs generated the JSON file, but I don't want to make changes to package.json to change that.

Since this is my first time contributing, I ran tests and saw some failures, but they don't relate to this pull request so far as I can tell. If I did break the tests somehow, please let me know so that I can figure out how that works. I would like to be able to contribute more often, even if only to incorporate things into the docs.

@@ -4,7 +4,9 @@ import { MeterBase, MeterBaseOptions } from "./MeterBase";
export type DCMeterOptions = MeterBaseOptions;

/**
* DCMeter gets the raw value of the input signal at the current time.
* DCMeter gets the raw value of the input signal's waveform amplitude
* at the current time and displays it as a value between 0 and 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the DCMeter is not limited to 0-1, it should be able to accept any number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I use .getValue(), I see output values of -1 to 1 (which is an error and needs changed in this). The doc edit references that output, not the input. Am I understanding this incorrectly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking at this basic demo that I set up the other day: https://codepen.io/cjwit/pen/PozzrxP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The audio output of PolySynth is in the audio range (-1 to 1), but if you connect something with a different value, you can see that the values are not limited to that range:

const meter = new Tone.DCMeter()
const signal = new Tone.Signal(4).connect(meter)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obviously related to me learning the system. Since a Signal appears to represent a wide range of types of values, it isn't clear to me what your example represents. (As in, I'm not sure what the "4" is relating to.) Since the point isn't troubleshooting here, I removed that language and pushed the change to the PR.

@tambien
Copy link
Contributor

tambien commented Oct 2, 2022

thanks @cjwit Sorry to sleep on this! helpful PR

@tambien tambien merged commit 3de6c81 into Tonejs:dev Oct 2, 2022
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

Successfully merging this pull request may close these issues.

2 participants