Skip to content

Latest commit

 

History

History
286 lines (263 loc) · 11.2 KB

TODO.md

File metadata and controls

286 lines (263 loc) · 11.2 KB

ToDo

Testing

  • Test in Safari
  • Test in FireFox
  • Engage betatesters
  • Review documentation in spellchecker
  • Upgrade jQuery to v3 and re-test (thoroughly)

Bugs

  • Node deletion only works once
  • Loading a synth with two ADSR nodes generates horrible sounds
  • Buffered audio nodes fail after switching back&forth from empty preset
    • Uncaught (in promise) DOMException: Unable to decode audio data
    • See lines 260 and 302 in synth.ts
  • ADSR needs more testing & refining
  • Popping sound at note on/off (improved after adding adsr depth parameter)
  • Analyzer should detect when no sound is playing and clean osc and fft graphs
    • Only visible in synths without ADSR
  • Piano notes get stuck
  • When app window is scrolled down, node connection draws arrows incorrectly

Relaunch plan

  • Tracker branch
  • Remove tracker (too big)
  • Upgrade development dependencies (typescript, webpack, etc.)
  • Reorganize paths to more conventional src/, web/, etc.
  • Upgrade .gitignore
  • Apply tslint, update code when required
  • Upgrade runtime dependencies (...if required?)
  • Live coding branch
  • Fix deprecation warnings

Live Coding

  • Document and publish

    • Merge with master
    • Publish in GitHub pages
    • Tutorial
    • Examples
    • Document API
  • Synth API

    • Do not require an instrument for track playing
      • Use the first instrument in the instruments table
      • If instrument table is empty, use some default preset
    • Track synchronization via cue/sync methods
      • Cue to post message
      • Synch to wait for message
    • Track solo / unsolo
    • Copy from Sonic Pi
      • Notes
      • Rings
      • Scales
      • Random helpers (shuffle, etc => use deterministic seed)
    • Sample loading + playing API
      • Load samples via lc.instrument(sample/name)
      • Samples must have been uploaded via drag/drop
      • Trace "Loading instrument name..." and "Instrument name ready" in sample and wavetable instruments
      • Trace "Instrument name ready" for Modulator instruments
    • LiveCoding startup/shutdown
      • lc.init(async function() { ... }) to perform sample initialization
      • Start playing only after await lc.init has returned
      • Probably not required for sample loading if provided by lc instance
    • Add many more instruments
    • Custom effect support: predefined and user-defined
    • Ramps in track gain and effects
    • Global pause / stop / continue
    • Track stop / pause / continue
    • Control global track gain node: gain, mute/unmute
    • Set effect and instrument parameters according to track time
    • Effects API
    • Set instrument parameters
    • Tracks with loops & loop update after end of current
    • Make synth use the velocity parameter in noteOn
    • BPM API
    • Smarter code completion for parameters, effect names, etc.
    • Prevent instrument and effect instances to be shared across tracks
  • Editor

    • Add more panels
      • Info
        • Tracks: name + status: timeline, mute/solo, stopped
        • Effects: name + params
        • Instruments: name + params
        • Samples
        • Click on effect/instrument to display params in params panel
      • instruments and parameters => click to edit parameters in separate panel
      • osc & fft
      • log
        • Colors in logs, e.g. note data
        • Trace event time information in 00:00.000 format
        • Log more events: instr/track/effect creation, etc
        • Stop event tracing after error, restore it after next run
        • Make log_enable receive two parameters: log_notes and log_events
    • Button row
      • FFW / RWD
      • Stop / pause / continue
      • Help / live coding API / tutorial
      • Run code / Run line|selection
      • Increase / decrease font
    • Dark theme
      • configure code colors with monokai
    • Store more data in localStorage
      • Color theme
      • Selected buffer
      • Font size and cursor location for each buffer
    • Multiple editor buffers
    • Preserve editor code across page refreshes
    • Partial run
      • Run current line
      • Run selection
    • Flash code to be run
    • Show sound in graphs (osc and fft)
  • Get note duration by searching for attack/decay times

  • Detect errors in code:

    • Let Monaco editor detect syntax errors
    • Fine tune error marker colors
    • Fine tune error marker location (start and end columns)
    • Add hover message to error marker
    • Capture runtime errors and highlight line number
    • Display error message on line hover
  • Do as with tracker

    • Use separate route and independent pages
    • Make page layout take 100% of height
  • Background canvas

    • Canvas API
    • WebGL / 3D Canvas
  • Quick fix errors (upon enter or alt+enter, look only at current line)

    • Add function () and ,
    • Add array and object ,
    • Avoid lines inside comments or strings

Functionality

  • Review TODO items inside code

  • Allow parameter changes in poly mode => start in poly mode

  • For demo purposes, enable arpeggio and portamento in some patches, or create new ones if required.

  • Custom nodes

    • Keyboard control node
      • To control other parameters based on the note being pressed
      • With depth parameter
      • Similar to ADSR, but without ramps
    • Full synth as a reusable node (long term)
      • Node parameters:
        • Param 1: select synth from patch list
        • Param 2: output volume
      • Add new "Effect In" node in the palette, to allow pure effect patches
    • A proper implementation of a pitch sihfter
  • Review list of pending audio nodes

    • WaveShaper
    • Etc?
  • Improve ADSR

    • Linear/exponential switch
    • For calculating exponential ramp cut, the spec has the formula.
  • Improve soundbank: multi-file upload

  • Navigate selection of audio nodes in the graph using the keyboard, e.g. page up / page down, or alt+left / alt+right

  • Preset selector: update preset combo when navigating with keys or < and > buttons

  • Load all & save all: support loading and saving the whole preset collection

  • Provide more preset instruments

    • Accept contributions
    • Organize presets in groups according to their type
  • Node comments

    • Double click on node to show popup to let the user edit node comments
    • Display node comments as simple tooltip (plain HTML or bootstrap)
  • Use tooltips to describe nodes in palette

  • Synth patch comments

    • Double click on a free spot in canvas to show popup to let the user edit synth comments
    • Display synth comments on bottom left corner of canvas
  • Limitation: a control node can only control a single parameter name

    • Prevent from connecting a control node to more than one destination
    • Or else, modify the UI to support multiple destination nodes
  • Use Web Midi API to gather events from external midi Keyboard

UI

  • Review the following audio front-end libraries, especially for the node parameters area:
  • Help
    • Provide description of each node and each of its parameters.
  • Usability / UX
    • Consider a better way to add nodes from the palette into the canvas
    • Consider a more user-friendly way to connect and disconnect nodes
  • Improve layout
    • More flexible layout
    • Remove hardcoded dimensions from canvas
  • Option to enable/disable snap to grid - automatically align misaligned nodes
  • Cool design -> themes & theme selector
  • Branding
  • Naming

Tracker

  • Tracks
    • display track rows and content
    • add / remove track
  • Parts
    • Code cleanup for parts with empty notes: create always default empty note array
    • Record button - start with first note
    • Start select / end select / cut / copy / paste
    • Delete row / insert row
    • New part / Delete part / Add to track / move up / move down
  • Apart from controlling Modulator instruments, also emit MIDI events to external devices

Long term

  • Rethink control nodes:
    • It's not about control nodes, it's about control connections
    • Any node output can be connected either to another node input or another node parameter.
    • Thus, there are no control nodes (other than custom ones such as ADSR), but control connections, or simply, connections to parameters
    • A different way to create a connection is required, where the user can explicitly specify whether it is an audio or control connection
    • Pros:
      • More versatile: any node can be used for audio or parameter control
    • Cons:
      • Less intuitive: no way to know whether the main purpose of a given node is to be used for audio or controlling other node's parameters. But colors could still be used as a guideline, and there will still be some pure control nodes such as the ADSR.
  • Review this:
  • Custom nodes with WebWorker... when available
  • Record & save audio
  • Server-side part, supporting:
    • Loading & saving of resources: synth patches, songs, samples, etc.
    • User area storing user's synths, current work, etc.
    • Public sample library
  • 100% responsive & mobile / tablet friendly
  • Mobile app

Code

  • Provide an interface that predefines the very common noteOn / noteOff methods
  • Decoupling
    • The piano module group should not contain UI code. Therefore, module piano.ts should be moved out of it, and the dependency should be reversed so that the piano module group is fully decoupled from any UI.
    • Also, noteinputs.ts has a dependency with synthUI that should be removed
  • Avoid hardcoded DOM id's in code, e.g. $('#my-button'), except for specifying containers at top level. Just do a global search for $('# and review all matches not in main.ts.
  • Review jQuery event registration to check that no event gets registered more than once
  • Extract the following independent npm modules:
    • graph.ts
    • An npm module with all code in the synth folder
  • Improve code to clean hack that checks for custom nodes when connecting.