This package has been deprecated

Author message:

replaced with @musical-patterns/material

@musical-patterns/compiler
TypeScript icon, indicating that this package has built-in type declarations

1.0.149 • Public • Published

Build Status

Musical Patterns - Compiler

Takes whatever amazing craziness a given pattern calls for and compiles it down into a basic format playable by the @musical-patterns/performer.

First it calls each of the "materialize" functions with the specs you've provided (or defaults to the pattern's initial specs). For example, you could materialize some scales and entities using specs provided through making selections in the UI of the @musical-patterns/playroom. The pattern's specs and materials are unique to each pattern, but their job is to together produce data the compiler can resolve. So, once thus materialized, the compiler reduces the large amount of data produced down to fundamental sound instructions for the @musical-patterns/performer.

usage

import { compilePattern } from '@musical-patterns/compiler'
import { CompiledPattern, setupPerformer, Voice } from '@musical-patterns/performer'

const material: Material = {
	materializeEntities,
}

const spec: MySpec extends StandardSpec = {
	// anything
}

const compiledPattern: CompiledPattern = await compilePattern({ material, spec })

setupPerformer({ compiledPattern })

terminology

repetend

When a voice has a section which does not specify the number of times it should repeat, it will repeat forever. In this case, it is the voice's repetend. A repetend is a section. Its index is the index within an array of sections.

segno

Italian for 'sign', this is the time position a voice repeats from once it reaches its end. The segno index is the index of a sound in the voice's sounds array. The segno time is a position in milliseconds.

Readme

Keywords

none

Package Sidebar

Install

npm i @musical-patterns/compiler

Weekly Downloads

0

Version

1.0.149

License

MIT

Unpacked Size

33.9 kB

Total Files

48

Last publish

Collaborators

  • cmloegcmluin