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

hydrafriend

v0.0.4

Published

create stateful handlers for responding to samples in hydra

Downloads

2

Readme

HydraFriend

gif demo

Your friendly hydra library. A wrapper around hydra to allow for quicker, enhanded visual coding by way of stateful handlers and generators.

See it in action on Twitch!

Are There Docs?

Yes, but they are a work in progress - I will work on these once the library itself is more complete (I promise 🙏).

How Can I Use This?

Ok, so you've cloned this repo, or found it on npm. Congrats!! Then you had some serious issues trying to get it to work... my bad! These are the early days, things will only get better.

That being said, it is possible to use this right now. To do so, follow these steps:

  1. install atom
  2. install tidalcycles and hydra on atom
  3. navigate to the hydra-atom package on your machine (Linux: ~/.atom/packages/atom-hydra)
  4. remove this package and clone my fork
    • my fork adds 2 things:
      1. ability to eval whole file ctrl-alt-enter, necessary for importing packages
      2. installs the latest version of HydraFriend
  5. npm install in the forked repo
  6. open atom and go at it!

Example

Let's create a super trivial setup that will do invert the colors of an octagon every 5 times bd is heard. This example assumes you have a SuperCollider session that relays messages to some given port (we are using port 3333). For an example file to use at startup, see here.

visual.js

// import library (now on npm yeah!)
const { Handler, HydraFriend, initialize, Shape } = require("hydrafriend");

// Only call initialize once
// see https://github.com/tado/ofxTidalCycles/blob/master/startup.scd
initialize(3333);

// define a new octagon shape
const octagon = new Shape()sides(8);

// handle bd by inverting every 5
const handle_bd = new Handler("bd", () => octagon.invert());
handle_bd.every(5);

// register all our handlers
const hf = new HydraFriend();
hf.register(handle_bd);

music.tidal

d1 $ s "bd sn"