How to use the scribbletune.scale function in scribbletune

To help you get started, we’ve selected a few scribbletune examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scribbletune / johann / src / api.ts View on Github external
export const getScale = (rootNote, scaleName) => {
	// concatenate scales from octave range 1 to 6
	var o1 = scale(rootNote + 1 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	var o2 = scale(rootNote + 2 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	var o3 = scale(rootNote + 3 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	var o4 = scale(rootNote + 4 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	var o5 = scale(rootNote + 5 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	var o6 = scale(rootNote + 6 + ' ' + scaleName.toLowerCase()).map(sharpsToFlats);
	return o2.concat(o3, o4, o5, o6);
};
github wbkd / from-data-to-sound / index.js View on Github external
const notes = octaves.reduce((res, octave) =>
  res.concat(scribble.scale('c', 'whole tone', octave, false))
, []);

scribbletune

Create music with JavaScript and Node.js!

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis