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

@faddys/producer

v1.0.1

Published

Faddy's Music Producer

Downloads

1

Readme

#!/usr/bin/env roll

Faddy's Music Producer

Work of Faddy Michel

In Solidarity with The People of Palestine till Their Whole Land is FREE

Prerequisites

Installation

sudo npm i -g @faddys/producer

Usage

producer [ notation ]

.FaddysProducer

?# if [ ! -d .FaddysProducer ] ; then mkdir .FaddysProducer ; fi

.FaddysProducer/examples/

?# cd .FaddysProducer ; if [ ! -d examples ] ; then mkdir examples ; fi

.FaddysProducer/examples/maqsum.no

?# cd .FaddysProducer/examples ; cat - > maqsum.no
+==

~ 105 4

0/8 dom/01 1/8 tak/04 3/8 tak/07 4/8 dom/12 6/8 tak/06

-==

.FaddysProducer/index.orc

?# cd .FaddysProducer ; if [ ! -f index.orc ] ; then cat - > index.orc ; fi
//+==

sr = 48000
ksmps = 32
nchnls = 6
0dbfs = 1

instr 13, 14, beat

p3 *= 1000
SPath strget p4
strset p5, SPath

iEvent init ( int ( p1 ) % 10 ) + frac ( p1 )

kLoop metro 1/p3

if kLoop == 1 then

schedulek iEvent, 0, 1, p5, p6, p7

endif

endin

instr 3, playback

SPath strget p4
p3 filelen SPath

aLeft, aRight diskin2 SPath

outs aLeft / ( p5 + 1 ), aRight / ( p6 + 1 )

endin

instr 4, recorder

SPath strget p4

SPath1 strcat SPath, ".1.2.wav"
SPath2 strcat SPath, ".3.4.wav"
SPath3 strcat SPath, ".5.6.wav"

aLeft1, aRight1 inch 1, 2
aLeft2, aRight2 inch 3, 4
aLeft3, aRight3 inch 5, 6

fout SPath1, -1, aLeft1, aRight1
fout SPath2, -1, aLeft2, aRight2
fout SPath3, -1, aLeft3, aRight3

endin

//-==

.FaddysProducer/node_modules/@faddys/scenarist

?# cd .FaddysProducer ; if [ ! -d node_modules/@faddys/scenarist ] ; then npm i @faddys/scenarist ; fi

.FaddysProducer/node_modules/@faddys/command

?# cd .FaddysProducer ; if [ ! -d node_modules/@faddys/command ] ; then npm i @faddys/command ; fi

.FaddysProducer/score.mjs

?# cat - > .FaddysProducer/score.mjs
//+==

import Scenarist from '@faddys/scenarist';
import $0 from '@faddys/command';
import { createInterface } from 'node:readline';

await Scenarist ( new class extends Array {

constructor () {

super ();

this .directory = $0 ( 'producer-directory' )
.then ( $ => $ ( Symbol .for ( 'output' ) ) )
.then ( ( [ directory ] ) => directory );

this .argv = process .argv .slice ( 2 );

}

async $_producer ( $ ) {

this .directory = await this .directory;

if ( this .argv .length )
await $ ( ... this .argv );

}

async $score ( $, ... argv ) {

if ( ! argv .length )
throw 'Notation file to score is missing. Usage: score path/to/notation/file';

const notation = await $0 ( 'cat', argv .shift () )
.then ( async $ => ( {

output: await $ ( Symbol .for ( 'output' ) ),
error: await $ ( Symbol .for ( 'error' ) )

} ) );

if ( notation .error .length )
throw 'Could not read the notation file to score. Reason: ' + notation .error .join ( '\n' );

for ( let line of notation .output )
if ( ( line = line .trim () ) .length )
await $ ( ... line .split ( /\s+/ ) );

await $ ( ... argv );

}

async $on () {

const score = await $0 ( 'cat - > .FaddysProducer/index.sco' );

for ( const note of this )
await score ( typeof note === 'object' ? this .note ( note ) : note ) ) .join ( '\n' );

await score ( Symbol .for ( 'end' ) );

await $0 ( 'csound -iadc -odac .FaddysProducer/index.*' );

}

$tempo ( $, ... argv ) {

if ( ! argv .length )
throw 'Tempo VALUE is missing. Usage: tempo VALUE (e.g., tempo 105)';

const input = argv .shift ();
const value = parseFloat ( input );

if ( isNaN ( value ) )
throw 'Tempo VALUE must be numeric. Usage: tempo NUMERIC_VALUE (e.g., tempo 105)';

this .tempo = value;

return $ ( ... argv );

}

$length ( $, ... argv ) {

if ( ! argv .length )
throw 'Bar length VALUE is missing. Usage: length VALUE (e.g., length 4)';

const input = argv .shift ();
const value = parseFloat ( input );

if ( isNaN ( value ) )
throw 'Bar length VALUE must be numeric. Usage: length NUMERIC_VALUE (e.g., length 4)';

this .length = value;

return $ ( ... argv );

}

time = 0;

[ '$|' ] ( $, ... argv ) {

return this .push ( `b ${ ++this .time * this .bar }` ), $ ( ... argv );

}

$$ ( $, label, ... argv ) {

this .label = label;
this [ label ] = [];
this [ '$' + label ] = ( $, ... argv ) => {

this .push ( ... this [ label ] );

return $ ( ... argv );

};

return $ ( ... argv );

}

left = 3;
right =3;

[ '$=' ] ( $, left, right, ... argv ) {

Object .assign ( this, { left, right } );

return $ ( ... argv );

}

#instance = 0
instance () { return ++this .#instance % 10 === 0 ? ++this .#instance : this .#instance }

$_director ( $, ... argv ) {

if ( ! argv .length )
return this .label;

const [ step, divisions ] = argv .shift () .split ( '/' );
const sound = argv .shift ();
const { time } = this;
const note = { step, divisions, sound, time };

this .push ( note );

if ( this .label ?.length )
this [ this .label ] .push ( note );

return $ ( ... argv );

}

note ( { step, divisions, sound, time } ) {

const instance = this .instance ();

return [

'i',
`13.${ instance }`,
`[${ step }/${ divisions }]`,
time === this .time - 1 ? this .time : -this .time,
`"${ this .directory }/equipment/${ sound }.wav"`,
instance,
this .left,
this .right

] .join ( ' ' );

}

record = {}

 $o ( $, path ) {

this .push ( `i 4.${ this .record [ path ] = this .instance () } 0 -1 "${ path }"` );

}

} );

//-==
?# $ node .FaddysProducer/score.mjs > .FaddysProducer/index.sco
?# -1 -2 csound -iadc -odac .FaddysProducer/index.*