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

Improve documentation #72

Open
ScreamZ opened this issue Jan 18, 2024 · 1 comment
Open

Improve documentation #72

ScreamZ opened this issue Jan 18, 2024 · 1 comment

Comments

@ScreamZ
Copy link

ScreamZ commented Jan 18, 2024

Hello!

First I wanted to thank you for this awesome library, It's been months that I have been looking for such capabilities, especially since this time I'm working to play sound effects in an escape room where the state is driven by a NodeJS application and sound too.

I was relying on Chrome + Puppeteer currently, which is kind of dirty and not working all the time.

If you could help me with some issues while implementing I would be happy to help on deploying real documentation for this tool which can help in the adoption of the product (which is highly underrated at the moment I guess).

Something like https://starlight.astro.build/, what do you think ? This is a static website that can be hosted on github pages for free and live in that repository.


What could live in documentation

  • Installation of a jack server and configuration of required library per system.
  • Usage example detailed which remote loading and things like that.
    As an example how to create ArrayBuffer from NodeJS Buffer using a library like axios
async function getArrayBufferFromURL(url: string): Promise<ArrayBuffer> {
  try {
    // Make an HTTP GET request to the specified URL
    const response = await axios.get<Buffer>(url, { responseType: "arraybuffer" }); // In fact this returns a Buffer currently in NodeJS

    const arrayBuffer = new ArrayBuffer(response.data.length);
    const view = new Uint8Array(arrayBuffer);
    for (let i = 0; i < response.data.length; ++i) {
      view[i] = response.data[i];
    }

    // Return the array buffer
    return arrayBuffer;
  } catch (error: any) {
    console.error("Error fetching data:", error.message);
    throw error;
  }
}

const audioBuffer = await context.decodeAudioData(await getArrayBufferFromURL(config.url));

What do you think ?

@b-ma
Copy link
Collaborator

b-ma commented Jan 23, 2024

Hey thanks for the proposal, actually more documentation would be really welcome indeed.

The only thing I'm unsure is to make a whole website for that at this point, I think raw markdown files in a docs directory would be enough to start with.

Then if the size of the documentation starts to be large enough, that would be really simple to insert them in a static website generator (I would go for https://vitepress.dev/ actually as I already have several documentation websites, e.g. https://soundworks.dev/, based on this solution)

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