Skip to content

Suppress Tone.js console logs on start: %c * Tone.js v15.0.2 * background: #000; color: #fff #54

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

Open
SableRaf opened this issue Apr 18, 2025 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@SableRaf
Copy link

When using p5.sound, the following message is logged to the console on start:

%c * Tone.js v15.0.2 *
background: #000; color: #fff

This comes from Tone.js and can be silenced by setting window.TONE_SILENCE_LOGGING = true (see Tonejs/Tone.js#155).

I suggest silencing this log to avoid confusion, especially for new users to the library.

@SableRaf SableRaf changed the title Suppress %c * Tone.js v15.0.2 * background: #000; color: #fff console logs on start Suppress Tone.js console logs on start: %c * Tone.js v15.0.2 * background: #000; color: #fff Apr 18, 2025
@SableRaf SableRaf added the enhancement New feature or request label Apr 18, 2025
@ogbabydiesal
Copy link
Collaborator

this sounds good to me - i think tone is sufficiently acknowledged i the readme so that should be cool

@SableRaf SableRaf added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 24, 2025
@lvdopqt
Copy link

lvdopqt commented Apr 27, 2025

Hello! I added window.TONE_SILENCE_LOGGING = true at the top of app.js since it's the main entry point and runs early, before Tone.js is loaded. See the commit.
I thought about other options like setting it inside a function or during some setup step, but adding it directly to app.js felt more explicit and makes it clear to anyone reading the code that we're intentionally silencing the log from the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants