Giter Site home page Giter Site logo

dragoncoder047 / langton-music Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 598 KB

Langton's Ant generating music.

Home Page: https://dragoncoder047.github.io/langton-music

License: GNU General Public License v3.0

JavaScript 61.54% HTML 34.63% CSS 3.78% Shell 0.05%
demo generative-music javascript langtons-ant

langton-music's Introduction

  • I mostly use Javascript for web apps and Python for tools.
  • I picked up C++ and C via the use of Arduinos and have been self-taught otherwise.
  • I enjoy functional, homoiconic, and object-oriented langauges (especially Scheme) but have not had much experience using Scheme or Lisp. I'm trying to design one of my own but so far it's all just theoretical.
  • I have a blog that I occasionally write stuff on.
  • I am a member of the Conwaylife.com forums under the username wirehead.
  • I have a YouTube channel -- check that out when you get a chance.

Some of my projects

Noteworthy but incomplete/WIP stuff

  • Parasite - A game that can't be beaten by the player: you have to teach the NPC's how to play it for you.
  • PICKLE and Tinobsy - A new idea for a programming language, and a type system to implement it.
languages languages

Note: I excluded Javascript from the above language stats because its verbosity (curly braces, JSDoc comments, etc.) compared to other languages artificially inflates the amount of Javascript I seem to have written. Only about 60% of those lines are meaningful code.

langton-music's People

Contributors

dragoncoder047 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bariscanbilgin

langton-music's Issues

Factor ant direction into rows on ant action lookup table

Idea from conwaylife.com user "breaker's glider gun":

(also, I would like a thingy. you know where you say, {1:0 => put(1) fd lt}? well I want another number added to that 1:0. I want direction, and if there is only 1:0, it assumes all, but you can make 1:0:0, 1:0:1, ect to play different notes(or make different movements).)

Ants added in the current tick are processed immediately rather than on the next tick

See here.

There is a bug in my code (not fixed yet, but I might) that the ants are put in a queue, and processes them in order until it gets to the end of the list. The TermiteQueen spawns egga, which goes to the end of the list and is processed on the same step. It spawns eggb, which goes to the end of the list and is processed on the same step. You see where this is going. All of the eggx and turm ants end up on top of each other on the same tick.

Doesn't work on touch screen

Tested on iPad - screen glitches out to the view that occurred when the zoom was erroneously set to NaN. Perhaps the touches are being handled improperly.

Also X on popup dialogs do not close it.

Tools

Add more tools than just pan/zoom:

  • Draw ants
  • Draw cells
  • Select and move
  • Make default tool of drag apply when no other tool overrides it.
  • Keybindings.

version 3 plans

  • Use HTML5 <dialog> element instead of stupid CSS hack
  • Instead of overly verbose <command> elements use tag name as cmd, attributes as parameters
    • Instead of <action> per-tick commands, have it all in one and use <tick-wait /> elements
  • Use SVG instead of a canvas (simpler XML-based rendering, can use CSS (?? export issues))
    • still need canvas for media api? and/or export screenshot
  • Preserve the XML tree and just edit it (don't discard it after world is loaded) --> preserves comments too!
  • Make configuration system more straightforward (attributes for global options, separate dialog for preferences, etc)
  • Package everything up in global classes/objects & have main() method
  • Allow user scripting via <script> elements (JS eval = evil?) -- to add new breeds of ants
  • Add web file system access API to save or open
  • Add proper menu bar like usual desktop apps
    • Window Controls Overlay API to put it in menu bar
  • Block-ish based editor for ants
  • Infix expressions (instead of weird postfix thing)

Follow an ant

Add pulldown menu with all the ants in it (plus a "None" option to turn off tracking)

Load/dump doesn't work.

Run it for a bit.

Dump

Load

Dump

Load

Dump

Load

Etc... And the pattern changes each time = dump isn't serializing it properly.

Automatically pauses after short delay on first play

Upon first playing the pattern, the pattern automatically re-pauses itself after a short, fixed delay. It only occurs on the first play, after that everything works as expected.

This may be due to some bug in the media session code fighting with browser autoplay blocking.

#interpolations cause freezing

Some interpolations (expressions) freeze up the browser. None should freeze, they should throw an error if something is wrong.

Allow declaring colors.

Use <color> elements to set defined colors.

Could also use <config name="colorNNNN"> as it is a config value.

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.