Scribbletune

Create music with JavaScript & Node.js!


Scribbletune is a Node.js module that helps you construct musical ideas with JavaScript String & Array functions and export them as MIDI files! Let's jump right into into it,

npm install scribbletune

Let's put something together. Create a file called chords.js and paste the following in it,

var scribble = require('scribbletune');
var clip = scribble.clip({
    notes: 'F#m C#m Dmaj Bm Emaj Amaj Dmaj C#m Amaj',
    pattern: 'x_x_x_--'.repeat(8),
    sizzle: true
});  

scribble.midi(clip, 'chords.mid');

Now execute that file in the terminal at the same location as you saved it,

node chords.js

This will generate a MIDI file called chords.mid in the same location as you executed this script. Here's how it sounded when I imported it into Garage Band and used the Synthesizer > EDM Chord > Sunrise Chords virtual instrument with a little reverb:


Click here to view the documentation and get inspired to create some music with JavaScript and Node.js!

Make some noise. Show your love. ★ Star this project on Github