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

@blibliki/engine

v0.1.27

Published

Blibliki Engine is a data-driven, non-UI JavaScript library written in TypeScript that serves as a framework for building synthesizers. Built on top of ToneJS, it aims to provide a streamlined interface for creating custom synthesizers.

Downloads

21

Readme

Blibliki Engine

Blibliki Engine is a data-driven, non-UI JavaScript library written in TypeScript that serves as a framework for building synthesizers. Built on top of ToneJS, it aims to provide a streamlined interface for creating custom synthesizers.

Approach

The engine operates in a data-driven manner, allowing developers to provide changes to the current module configuration rather than directly accessing the modules themselves. This approach facilitates seamless integration with state management libraries like Redux, making it easy to build applications with centralized state management.

One notable advantage of the data-driven approach is the ability to easily save and recall patches. By representing the synthesizer configuration as data, developers can effortlessly store and load patches, enabling users to save and share their custom presets.

Blibliki Engine offers polyphony support and provides access to essential audio modules such as oscillators, filters, envelopes, and effects. It's important to note that the list of available audio modules will be extended as the development of the engine continues.

Installing

npm install @blibliki/engine

Usage

import Engine from "@blibliki/engine";

Initialize

Engine.initialize returns a promise that resolves when the engine is initialized and ready for use.

Engine.initialize({ context: { lookAhead: 0.03 } });

Start / Stop

This methods are triggering all audio modules to start or stop

Engine.start();
Engine.stop();

Modules

AudioModule structure

All audio modules share the shame structure. The props structure vary per audioModule.

{
  id: string,
  name: string,
  props: Object,
  inputs: [{
    id: string,
    name: string,
    moduleId: string,
    moduleName: string
  }],
  outputs: [{
    id: string,
    name: string,
    moduleId: string,
    moduleName: string
  }],
}
Create audio module
const master = Engine.master;
const osc = Engine.addModule({ name: "Osc", type: "Oscillator" });
const volume = Engine.addModule({
  name: "Vol",
  type: "Volume",
  props: { volume: -10 },
});
Update props
// Update props
Engine.updateModule({ id: volume.id, changes: { props: { volume: -20 } } });
Engine.updateModule({ id: osc.id, changes: { props: { wave: "square", fine: -10 } } });
Remove audio module
Engine.removeModule(osc.id);

Routes

Route structure
{
  id: string,
  sourceId: string,
  outputName: string,
  destinationId: string,
  inputName: string,
}
Add Route
// Connect oscillator out to volume input
const oscVolRoute = Engine.addRoute({
  sourceId: osc.id,
  outputName: "output",
  destinationId: volume.id,
  inputName: "input",
});

// Connect oscillator out to volume input
const volToMaster = Engine.addRoute({
  sourceId: volume.id,
  outputName: "output",
  destinationId: master.id,
  inputName: "input",
});
Remove route
Engine.removeRoute(oscVolRoute.id);

Contributing

As a work-in-progress project, Blibliki Engine actively welcomes contributions and feedback from the community. Whether it's reporting issues, suggesting new features, or submitting code changes, contributors are encouraged to get involved and help shape the future of Blibliki Engine.