PORTRAIT DETECTED

Please rotate your device to landscape for the Cinematic Academy.

COSMIC SYMPHONY

العرض الحر (Free Performance)

ALGORITHMIC MUSIC API (JS)

Write actual JavaScript. Use loops, variables, mathematical chaos, and Neural Networks.

API REFERENCE

Functions

  • play_note(note, dur)
    Plays a single specific note.
  • play_chord(root, type, dur, oct)
    Plays a full chord.
  • arpeggiate(root, type, dur, times, oct)
    Plays chord notes sequentially.
  • random_gen(root, type, dur, count, oct)
    Random notes from scale.
  • rest(dur)
    Adds silence.
  • get_scale(root, type, oct)
    Returns an Array of notes (e.g., ['C4', 'E4', 'G4']).
  • map_to_scale(value, scaleArray)
    Snaps a decimal (0.0 to 1.0) into a perfect musical note! Perfect for math equations.

Parameters & Objects

  • note: 'E5', 'C#4', etc.
  • root: 'C', 'C#', 'D', 'Eb', 'E', etc.
  • type: 'major', 'minor', 'minor7', 'major7', 'diminished', 'pentatonic', 'blues'
  • dur: '1n' (whole), '2n' (half), '4n' (quarter), '8n', '16n'
  • brain: Access to the Brain.js Neural Network library. Use new brain.NeuralNetwork().
𝄞
---
System Ready