npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mdarrik/gatsby-theme-soundboard

v1.0.0

Published

A Static site that serves as a soundboard. Can combine with serverless functions to create side-effects

Downloads

3

Readme

gatsby-theme-soundboard

This is a simple theme to create a list of audio files and have them perform an action.

The inspiration for this idea came from a twitter conversation with Jason Lengstorf about letting guests play sound-effects on stream.

The idea was also a little inspired by Jeffrey Fritz's Stream Setup

So for instance, you could add some auth0 and integrate this with netlify functions or Azure to raise sounds on your local machine when someone else pushes the button.

Installation

To use this theme:

  1. Install the theme
yarn add gatsby-theme-soundboard

(also works with NPM)

  1. Add theme to gatsby-config
  • Set the path to your sound files in the options with soundPath
  • Set the path to your sound metadata YAML files with metadataPath
  • Set the base route for your sound files with basePath
module.exports = {
    plugins: [
        {
            "gatsby-theme-soundboard",
            options: {
                soundPath: "path-to-your-sounds",
                metadataPath: "path-to-your-YAML-files",
                basePath: "path-you-want-your-sounds-to-appear-on"
            }
        }
    ]
}
  1. Add your sound effects and metadata to the path you set in your config. NOTE: You must have at least 1 file and corresponding metadata element for your site to build. There's an issue with querying gatsby-source-filesystem inside themes that throws an error for the sound file queries.

  2. Start Development

yarn develop

Theme Config Options

| Options | Default | Description |:---------|:----------|:----------- |soundPath | sound-effects | The path to your audio files used in your soundboard. This lets gatsby-source filesystem know where your files are. |metadataPath | sound-effect-metadata | The path to your YAML files which includes your sound effect metadata. You only need one YAML file for all your sounds in this directory, but can use more if desired. |basePath | "/" | The path you want your soundboard to be located. E.g. if you want your soundboard at "siteUrl/sounds" you would set this value to "/sounds in the config |

##Metadata Structure

- name: The Name you want to display
  file_name: the Name of your file with the extension 
  #file_name is used to get the correct sound for your file! Please include it.
  source_name: Where You got the Sound
  source_url: A link back to the source
  license: The kind of license for the sound
  license_url: a link to the license (necessary for CC licenses)
  description: A description of the sound. Also used to describe the sound to Assistive Technology

Routes

The theme currently automagically generates pages for you. The routes created will be:

mysite/basePath - A grid of all of your sounds
mysite/basePath/sound-name - The file with the specified name in your metadata

Components

|Name | Description | Props |--- | --- | --- layout | Wraps the pages. Base version only used for Styling | N/A sound-board-button | The button that triggers the event on your sound-board. Shadow this if you want to turn off effects or change your button icon. | audioRef: A ref to the audio file. This allows the button to play the file. fileName: The name of the file. That way you can register which sound was clicked in your button event. |sound-effect-list | The grid of all of your sounds that makes up your soundboard. | soundEffects: The list of metadata for all of your sounds. soundFiles: A list of all of your files. includeDefaultControls: A boolean that causes the default audio controls to be used. Useful if you override the sound-board-button to not play sounds. Defaults to false since the sound is played by the button instead.