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

intermix

v0.8.1

Published

Javascript/Typescript framework for building music apps

Downloads

4

Readme

Intermix

Code Climate Test Coverage


Warning

This software is in an early stage and the API is still under development. The current release (0.8.0) is just a milestone and not ment to be used in production environments.


About

Intermix is a framework that can be used to create browser-based audio applications with a different approach than most other audio libraries. Its focus is not on high level abstractions of the Web Audio API. Instead it provides an architecture for plugins that can be used in any context that uses intermix.

With Redux as its foundation, intermix is also a predictable state container: No side effects, nothing unexpected - actions performed in Intermix are completely predictable.

Install

npm install intermix

or if you prefer yarn

yarn add intermix

Usage

Load intermix into your module with ES2015 module syntax

import * as intermix from "intermix";

or with CommonJS module require

const intermix = require("intermix");

now you can start building an audio app. For example instantiate a sequencer and a synth

const sequencerUID = intermix.addPlugin('Sequencer');
const synthUID = intermix.addPlugin('Synth');

you can build a sequencer-part and add it to the score

// Sequencer parts are containers that hold notes and other events.
// They have a length of 1 full note, divided into 16 steps by default.
const seqPartUID = intermix.addSeqPart();

// action creators are functions that send actions to a plugin
const seqActionCreators = intermix.getActionCreators(sequencerUID);

// The following binds the part to the synth plugin and adds it to the score.
// Now all events in the part will be routed to the synth
seqActionCreators.addToScore([seqPartUID, synthUID]);

There's much more you can do with intermix. The API doc in the project wiki is a good starting point and there will be more infos on the webpage soon.

Concept

Most of the API is message based. Intermix messages are an amalgam of OSC messages and Redux actions:

{
    address: "/intermix/plugin/i2342/envAttack",
    type: "envAttack",
    typeTag: ",sff",
    value: ["Envelope Attack", 0.42, 0.0],
}

The action above is of type "envAttack". It would be send to a plugin with the ID "i2342". The attack value is 0.42 and it will be executed at second 0 (which means right now).

The typeTag says that the value is a tuple of type [string, float, float]. Controller actions normally start with a string that holds a name followed by the actual value and the time in seconds when the action should be executed. The execution time is vital in a browser because there's no realtime like in an os-native app. Executing actions in the sequencer means to schedule them to be executed in the near future.

For an app developer there's no need to build these actions manually as intermix provides action creators for all managed plugins. These functions create and dispatch actions for you.

A plugin developer can write action definitions that are consumed by intermix to build the internal logic at runtime:

{
    address: "/intermix/plugin/<UID>/envAttack",
    typeTag: ",sff",
    description: "Envelope Attack with name, value and start time",
}

Features

  • Architecture for browser-based audio plugins
  • Predictable State Container for all managed plugins
  • Message based, easily extendible OSC-like API
  • Build-in sequencer with rock solid timing
  • Simple build-in synth- and sampler plugins

Dependencies

Note: Redux is often used together with the React UI framework but this is totally up to you. Intermix can be combined with any UI technology you like.

Browser Compatibility

| Chrome | Firefox | Edge | Internet Explorer | Opera | Safari | |--------|---------|----------|-------------------|----------|----------| | 83+ | 77+ (*) | untested | untested | untested | untested |

* Sample accurate pause/resume of sounds not tested (didn't work in previous versions).

License

Licensed under the GNU Lesser General Public License V3