This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageBus { | |
constructor() { | |
this.listeners = []; | |
} | |
subscribe(listener) { | |
this.listeners.push(listener); | |
} | |
send(message) { | |
this.listeners.forEach(function(listener) { | |
listener.onMessage(message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- TidalCycles QUICK REFERENCE ---- | |
---------------------------------------------------------------- | |
-- To use in your editor after or alongside your code for quick reference | |
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions | |
-- designed with atom - monokai one dark vivid as theme | |
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm | |
---------------------------------------------------------------- | |
-- Some sources of Documentation -- | |
-- https://tidalcycles.org/patterns.html | |
-- https://tidalcycles.org/functions.html |