Giter VIP home page Giter VIP logo

umt-server1's Introduction

umt-server1 is a web server written in Golang that handles the Ultimate Music Toy (UMT) web app. The composition engine in JavaScript is incorporated (as of 2016-03-27) from the umt repository where it was originally developed as a standalone web page into umt.go here. The file ws.go in the main directory is a web server that simply picks up the web requests and hands them off to the relevant app; each app has its own package in Go. Web requests for UMT are simply handed off to umt.go, and everything else is handled from there. The only other package needed is the login package which identifies who logged in and assigns everyone user IDs.

This is called server1 because the plan is to have 2 servers: one that runs on the internet that handles saving and loading of tunes (or more precisely, of parameter sets), and basic administrative chores like that. It will create MIDI files and maybe someday handle things like creation of sheet music. The other server, server2, will run on the same machine as the web interface, and will handle real-time instrument playback over non-WebAudio API systems, such as MIDI and OSC. As of right now, server2 hasn't been started yet, so only server1 exists.

The Ultimate Music Toy (UMT) is a music composition system that lets you interactively change the composition while it's playing, and immediately hear the results!

It runs in the web browser and is written entirely in Javascript and uses the WebAudio API in HTML5 to actually play the music.

Tested to work on Chrome but should work on any HTML5-compliant browser.

by Wayne Radinsky

Demo

There is a live demo at http://ultimatemusictoy.org/ .

Conventions

Goal of doing everything the simplest possible way.

  • All UMT code must pass JSLint. No exceptions. JSLint is treated as the target language. This includes stylistic conventions. None of the default options for disabling checks are allowed. The comment line at the beginning of the code specifies all the JSLint flags that will be used, which is currently only one: browser: true.

  • Modularity is achieved by prefixing all the functions with umt. Yes, this is more tedious than other methods, but it is the simplest possible way I could think of and unambiguous. All data is put into a single global variable called gUmt. This should eliminate variable name collisions if UMT is used as part of another project. In general, I tried to design the system using the simplest possible design decisions at each stage, so the code is as unambiguous as possible and as easy to understand as possible. (Not saying it's actually easy to understand, since there is a certain level of unavoidable complexity, only that an effort was made to make it easy and reduce ambiguity at every stage as much as possible.)

  • The UI is done with only jQuery sliders. (And built-in HTML controls such as listboxes). There are no custom UI elements and no other UI elements in the system. This was partly for simplicity and partly because my primary focus has been getting the actual music composition working properly.

  • Since jQuery sliders are shadowed in data variables (stored in gUmt.UIParams), the decision was made to shadow all UI imputs, and implement a function that transfers data from the shadowed variables to the UI -- this will make it possible to "load" settings saved earlier into the UI. If you develop an alternate UI for UMT you will need to implement this.

umt-server1's People

Contributors

waynerad avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.