{"id":13804909,"url":"https://github.com/kylestetz/lissajous","last_synced_at":"2025-04-07T16:18:27.495Z","repository":{"id":14945850,"uuid":"17670471","full_name":"kylestetz/lissajous","owner":"kylestetz","description":":musical_note: A tool for programmatic audio performance in the browser using Javascript.","archived":false,"fork":false,"pushed_at":"2015-11-09T03:22:46.000Z","size":993,"stargazers_count":404,"open_issues_count":11,"forks_count":25,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-31T14:13:34.242Z","etag":null,"topics":["audio","livecoding","music","performance"],"latest_commit_sha":null,"homepage":"http://lissajousjs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"saltstack-formulas/nginx-formula","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylestetz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-12T14:50:02.000Z","updated_at":"2025-03-31T04:18:41.000Z","dependencies_parsed_at":"2022-08-07T18:00:25.184Z","dependency_job_id":null,"html_url":"https://github.com/kylestetz/lissajous","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylestetz%2Flissajous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylestetz%2Flissajous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylestetz%2Flissajous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylestetz%2Flissajous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylestetz","download_url":"https://codeload.github.com/kylestetz/lissajous/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685628,"owners_count":20979085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","livecoding","music","performance"],"created_at":"2024-08-04T01:00:55.296Z","updated_at":"2025-04-07T16:18:27.476Z","avatar_url":"https://github.com/kylestetz.png","language":"JavaScript","funding_links":[],"categories":["Obsolete"],"sub_categories":["Community"],"readme":"\u003cimg src=\"https://raw.github.com/kylestetz/lissajous/master/environment/images/lissajous-repo-logo.jpg\" /\u003e\n\n## Lissajous\n\nLissajous is a tool for real time audio performance using Javascript. It wraps succinct tools for creating oscillators and samplers into a chainable API, allowing performers to build and improvise songs with a minimum of code.\n\nLissajous exists entirely within the Javascript console \u0026 was designed for use with Google Chrome or Firefox.\n\n#### [Play with Lissajous](http://lissajousjs.com)\nRequires the latest stable Chrome or Firefox build \u0026 a relatively recent OS. If you have your own .wav files you can drop them in the window to load them into the environment!\n\n#### Watch a few demo videos\n- [01 - \"performance\"](https://www.youtube.com/watch?v=jBRqOp5ws58)\n- [02 - \"slow guitar thing\"](https://www.youtube.com/watch?v=zLzRrKJLYjI)\n- [03 - \"synths\"](https://www.youtube.com/watch?v=degtBGL2TDY)\n- [04 - \"random walk\"](https://www.youtube.com/watch?v=4Krk9ujQwQk)\n\n#### Read the [Tutorial](https://github.com/kylestetz/lissajous/blob/master/Tutorial.md)\nThe tutorial is a work in progress but already serves as great starting point for new performers!\n\n#### [View the Performance API Documentation](https://github.com/kylestetz/lissajous/blob/master/API.md)\n\n#### Get a local copy\nIn order to run Lissajous locally you have to have a copy of the lissajous environment on your machine. Do this by pulling down this repo: `git clone git@github.com:kylestetz/lissajous.git` and opening the file `/environment/index.html`. The environment doesn't contain any samples- add an `/environment/samples/` folder (ignored by git) and add samples via `/environment/extras.js`!\n\n### This is what Lissajous looks like\n\n```javascript\n// make a triangle wave that loops the notes 69, 67, then 60 in quarter note intervals\nt = new track()\nt.tri().beat(4).notes(69,67,60)\n\n// load a sample, set the beat to quarter notes, set the note length to a half measure,\n// set the envelope to give it a little attack and release, and loop the notes 69, 67, then 60\ns = new track()\ns.sample(buffer)\ns.beat(4).nl(8).adsr(0.1,0,1,1).notes(69,67,60)\n\n// load an array of three AudioBuffers called 'drums', play them in 8th notes and give them\n// the sequence drums[0], drums[2], drums[1], drums[2]\nd = new track()\nd.sample(drums)\nd.beat(2).sseq(0,2,1,2)\n\n// load a piano sample and mess it up real good\np = new track()\np.sample(pianoSample)\np.beat(2).nl(2).speed(0.5).clamp(1/16).clshift(-1/16)\n```\n\n#### Basic Concepts of Lissajous\n\nA performance in the Chrome console using Lissajous takes place in the global namespace. You'll probably create a lot of variables with names like `s` or `a` or `b1` or `b2` or `doodle`, and this sort of usage is encouraged. Need to start over? Refresh the page.\n\nThe key to making the most of Lissajous is to add scripts (e.g. `extras.js`) that load all of your samples into the environment on page load. A clever or ambitious performer might write some additional functions to coordinate changes, control transitions, or execute other group-oriented operations with style and grace. Sky's the limit.\n\n\n### Every track has a step sequencer.\n\nTracks make sound when they are given a beat. Here's the minimum needed to generate some sound:\n\n```javascript\nt = new track()\nt.beat(4)\n```\n\nBeat is a step sequencer. Calling `t.beat(4)` says \"play a note every four 16th notes.\" The Lissajous API supports an arbitrary number of arguments, allowing us to make more complicated patterns:\n\n```javascript\nt.beat(4,3,2,1,4,2)\n```\n\nIf we visualized this in a classic step sequencer view, it would look like this:\n\n```\n 1           5           9           13\n[x][ ][ ][ ][x][ ][ ][x][ ][x][x][ ][ ][ ][x][ ]\n```\n\nThe clock ticks in 32nd notes, and the API is written to support both 16th and 32nd note expressions.\n\n```\nt.beat(1) // play a note every 16th note\nt.beat32(1) // play a note every 32nd note\n```\n\n#### Everything reacts to the step sequencer.\n\nMost of the parameters of a track can be given more than one value (we call this a pattern). For example, with notes:\n\n```javascript\nt = new track()\nt.beat(4).notes(69, 67, 60)\n```\n\nTracks are monophonic. Since we supplied three notes, they will play one at a time, looping back to the beginning when they reach the end. There's no limit to the number of notes you can have in a pattern.\n\nPatterns for each parameter are self-contained and do not rely on each other, allowing us to play with patterns of different lengths:\n\n```javascript\nt = new track()\nt.beat(4).nl(4,2).notes(69, 67, 60)\n```\n\nHere we toggle between a note length of 4 and 2 every time a note is hit, but we cycle through three different notes.\n\n\n### Samples can be sliced and diced.\n\nWorking with samples is simple in Lissajous. There are helper functions to get your samples loaded onto the page; check out `/environment/extras.js` for an example.\n\n```javascript\nvar t = new track()\nt.sample(mySample)\n// play a beat every quarter note with a note length of 4/16th\nt.beat(4).nl(4)\n// clamp to the first 1/16th of the sample \u0026 loop that portion\nt.clamp(0, 1/16).loop(1)\n// shift the clamp points by -1/16th of the sample size every beat\nt.clshift(-1/16)\n```\n\n-----------------------\n\n#### Todos\n- Develop a technique that would make smooth LFOs possible\n- MIDI in/out\n- Audio In\n- sharing JS context across multiple machines\n\n### Special Thanks\n\nThis project is made possible by a lot of people writing great articles and making great libraries. For the sake of completeness I have added several libraries to this repo.\n\n- [\"A Tale of Two Clocks - Scheduling Web Audio with Precision\"](http://www.html5rocks.com/en/tutorials/audio/scheduling/) by Chris Wilson (@cwilso)\n- [Tuna.js](https://github.com/Dinahmoe/tuna) by @Dinahmoe\n- The BufferLoader function from [\"Getting Started with Web Audio API\"](http://www.html5rocks.com/en/tutorials/webaudio/intro/) by Boris Smus\n- [Recorder.js](https://github.com/mattdiamond/Recorderjs) by @mattdiamond\n- The Delay node from [JAM with Chrome - How we made the audio rock](http://www.html5rocks.com/en/tutorials/casestudies/jamwithchrome-audio/) by Oskar Eriksson","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylestetz%2Flissajous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylestetz%2Flissajous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylestetz%2Flissajous/lists"}