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

beatbuddybass

v0.8.0

Published

Parses Midifiles with drums, bass and midi markers to produce a set of BeatBuddy midifiles (e.g. intro, verse, outtro etc.)

Downloads

6

Readme

BeatBuddyBass - ALPHA version

Generates BeatBuddy midi files for the BeatBuddy "Rock with Bass Drum Kit" based on standard midi files with Markers indicating what parts to use.

Features

This program generates midi files for the BeatBuddy pedal.

The input files are standard midi files that are marked up in a sequencer.

Currently this has only been tested on a few Cubase 8 midi files where each sections to be extracted are indicated using a named start midi-marker and an end marker!

Cubase saves these markers in a separate marker track called "Markers" and this program extracts parts of the midi file based on these markers:

  • Sections are named according to the named marker and midi drums and bass notes are extracted until the next named or unnamed midi-marker

  • The Drum tracks are extracted and notes are aligned with the BeatBuddy "Rock with Bass Drum Kit" drum map (see the configuration below)

  • A Bass track with a name starting with "BASS" is also supported. The bass notes are transposed to fit the bass node samples in the "Rock with Bass Drum Kit" drumkit

The timing is also aligned within each of these new extracted midi files.

Sample files can be found in (see the configuration below):

"directory": {
			"inputPath"	: "examples/midiFilesIn",
			"outputPath": "examples/beatBuddyMidi",
			"jsonPath"	: "examples/jsonFiles"
		}

The "inputPath" holds the full midi input files. Open one or more of these files in a sequencer to see the sections are indicated using midi markers.

The "outputPath" holds the BeatBuddy midi output files that can be used with the BBManager.

The "jsonPath" holds the intermediate JSON files used to generate the midi.

Installation

$ npm install beatbuddybass

This module generates midi files and is intended for with Node.

Usage

Write a javascript ("runBBB.js") like this:

var bbBass = require('beatbuddybass');
//
// Save output in C:\Temp on Windows
//
var isWin = /^win/.test(process.platform);
if ( isWin ) {
	bbBass.setOutputPath("C:/Temp");
}
//
// Calling with multiple input midifiles
//
var midiFiles = ["Crossroads.mid", "KeyTTHighway.mid", "UnderMyThumb.mid"  ];
bbBass.createMidi( midiFiles);
//
// Or calling with a single file and an Option object
//
bbBass.createMidi("highwayChords.mid", { verbose: true } ) ;

Now run the script:

node runBBB.js

You can specify other options like bass and drums channel the createMidi() function, i.e.:

bbBass.createMidi( "YourMidiFile.mid", { bassCh: 4, drumsCh: 10, bassTranspose: 2 } );

For the bass channel and the drums channel you should provide the channel numbers shown in you sequencer. The bassTranspose can be used to transpose the bass, but be aware that you bass notes must fit within the 2 octaves available within the "Rock with Bass Drum Kit", both before and after you transpose it.

Configuration

The program comes with a configuration file, config.js, that defines the BeatBuddy rockDrumsWithBass drum map plus a template for the midi zero track to be added to each generated midi file and the directory paths, relative or absolute, for the input and output directories:

module.exports = {
	config :  {
		"drumMap": {
			"rockDrumsWithBass": {
				"bassTranspose": 36, // 3 Octaves (3*12)
				"drums" : {
					"36": 35, 	// KickDrum: [35,36]
								// CrossStick: 37 
					"40": 38,	// Snare: [38,40] 
								// HandClaps: 39 
								// TomFloor4: 41
								// HiHatsClosed: 42
								// TomLow3: 43
								// FootHiHat: 44
					"47": 45,	// TomHiMid2: [45, 47]
								// HiHatOpen: 46
					"50": 48, 	// TomHigh1: [48, 50]
					"55": 49,	// ChrashCymbal1: [49, 55, 57, 58]
					"57": 49,
					"58": 49,
					"52": 51, 	// RideCymbal: [51, 52, 59]
					"59": 51,
					"54": 53, 	// RideBell: [53, 54, 56]
					"56": 53
				}
			}
		},
		"zeroTrack": {
			"tempo": {
						"deltaTime": 0,
						"type": "meta",
						"subtype": "setTempo",
						"microsecondsPerBeat": 555554
					},
			"time": {
						"deltaTime": 0,
						"type": "meta",
						"subtype": "timeSignature",
						"numerator": 4,
						"denominator": 4,
						"metronome": 24,
						"thirtyseconds": 8
					},
			"endOfTrack": {
						"deltaTime": 0,
						"type": "meta",
						"subtype": "endOfTrack"
					}
		},
		"directory": {
			"inputPath"	: "examples/midiFilesIn",
			"outputPath": "examples/beatBuddyMidi",
			"jsonPath"	: "examples/jsonFiles"
		}
	}
};