alda

WE'VE MOVED! Join us at: http://slack.alda.io
2015-09-25T07:31:26.000119Z

Hi, Iam newbie Linux user and i wanna try install Alda but there is some problem /alda$ bin/alda play --code "piano: c6 d12 e6 g124" clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: No such task (bin/alda) data: {:file "/tmp/boot.user6319139997439029247.clj", :line 17} java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No such task (bin/alda) java.lang.IllegalArgumentException: No such task (bin/alda) boot.core/construct-tasks core.clj: 665 ... clojure.core/apply core.clj: 630 boot.core/boot/fn core.clj: 699 clojure.core/binding-conveyor-fn/fn core.clj: 1916 ... Can you help me?

dave 2015-09-25T14:20:18.000120Z

hi @danielvagina that's a strange error... it's almost like the alda task-runner script is trying to run itself as a task, which makes no sense

dave 2015-09-25T14:20:37.000121Z

there are a few pieces of info you could give me that will help me figure out the problem

dave 2015-09-25T14:20:48.000122Z

could you run the following and paste the output?

dave 2015-09-25T14:21:03.000123Z

(in the same directory that you ran the above)

dave 2015-09-25T14:21:08.000124Z

cat bin/alda

dave 2015-09-25T14:21:16.000125Z

bin/alda version

dave 2015-09-25T14:21:20.000126Z

boot --version

dave 2015-09-25T14:21:24.000127Z

java -version

dave 2015-09-25T15:53:19.000128Z

i am unable to reproduce this error locally -- when i run the same command in the alda project directory, i hear the chorus hook from "too many cooks" 🎶

dave 2015-09-25T15:53:38.000129Z

it may be useful to make sure that you have the latest boot and the latest alda

2015-09-25T16:28:47.000130Z

What I exatly shoud have in the first line of Alda !#??????

2015-09-25T16:29:52.000131Z

Sry>

2015-09-25T16:30:59.000132Z

Hello, Thank you for response. What I exactly shoud have in the first line of Alda file !#??? Thank you so much

dave 2015-09-25T17:16:13.000133Z

you don't need anything special in the first line of an alda score -- you can just start writing alda syntax

dave 2015-09-25T17:16:32.000134Z

e.g. this is an example of a valid alda score file:

piano: c d e f g a b > c

dave 2015-09-25T17:16:56.000135Z

there are some more examples here: https://github.com/alda-lang/alda/tree/master/test/examples

meow 2015-09-25T21:34:03.000138Z

So I was researching tori for my cellular automata library and came across a couple of interesting links that relate a torus to music theory. Thought some of you music folks might find them interesting: https://en.wikipedia.org/wiki/Orbifold#Music_theory

meow 2015-09-25T21:34:14.000139Z

and https://en.wikipedia.org/wiki/Tonnetz

meow 2015-09-25T21:37:36.000140Z

I haven't gotten around to generating fractal music yet, but if anyone else is interesting in taking a shot at it my ergo library is shaping up and does a good job at supporting L-systems. I'm still working on the cellular automata support, but that is coming along nicely as well.

2015-09-25T21:54:07.000143Z

Awesome. Yes, if you look at Neo-Riemannian music theory in particular, David Lewin describes the system of harmony in late romantic music using a hyper-torus

2015-09-25T21:55:52.000145Z

In particular, there are three operations that map a triad to another triad with two common tones, called P, L and R, each of which are involutions. I think it would possible to describe these within the L-System thing you’re working on

2015-09-25T22:00:05.000146Z

This was first introduced in the “Generalized Music Interval and Transformation Sytems” and has been expanded on quite a bit. One such variation by Adrian Childs adds the handling of tetrachords, especially sevenths and uses this system to analyze some Wagner passages that are particularly challenging within typical roman numeral analysis

2015-09-25T22:18:05.000147Z

@meow: I’d be very interested if you start anything in this direction. IDK if I have time to commit to it ATM but would love to eventually

meow 2015-09-25T22:21:54.000148Z

@csmith: I don't have any background in music theory, so it's going to take me a while.

2015-09-25T22:22:29.000149Z

ok no worries. I’m familiar with CA but haven’t really seen L-system before. I half-understand it I guess.

2015-09-25T22:22:59.000150Z

I have a lot of background in music theory. LMK if maybe you have specific questions or things you want to look at that I can point you to

meow 2015-09-25T22:23:42.000151Z

My main interest is in developing a toolkit to make it easy to use generative code and custom rules to create sequences of commands that get rendered graphically or musically.

meow 2015-09-25T22:24:39.000152Z

If you look at L-systems you'll see that they are very simple, but can be powerful.

meow 2015-09-25T22:25:28.000153Z

The code in ergo pretty much supports every known variation of L-systems, many of which have formal names that are basically BS, imnsho.

meow 2015-09-25T22:26:14.000154Z

They reflect poor or shortsided implementations or mathematicians trying to represent everything on paper.

2015-09-25T22:26:50.000156Z

sounds cool

2015-09-25T22:27:46.000157Z

My half-understanding so far makes me think that the neo-riemanian stuff would be appropriate. A lot of folks have done various group theory things with them

meow 2015-09-25T22:27:48.000158Z

I think my implementation solves all these limitations. The potential is that even with the poor implementations out there, L-systems are used to model plant growth, caves, architecture, game content, music, fractals, crystals, etc. Lots of potential.

2015-09-25T22:28:06.000159Z

awesome

2015-09-25T22:28:57.000160Z

I have a cellular automata runner in C with OpenGL that is programmable in Scheme. It’s super fun but somewhat limited by what CA’s do, though some “impurity” WRT a true CA is allowed

2015-09-25T22:29:24.000161Z

so, interested in something that generalizes and takes similar stuff abit farther

meow 2015-09-25T22:31:11.000162Z

I'd be interested to know what you think of my approach to the CA stuff. It's been influenced by having started with the L-systems and after many iterations coming up with this nice function that drives everything:

(defn produce
  "Returns a lazy sequence of colls from a recursive, axiomatic, transducible
   process."
  [seed prep-f get-xf]
  (letfn [(process
            [coll]
            (lazy-seq
              (when (seq coll)
                (let [new-coll (into (empty coll) (get-xf coll) (prep-f coll))]
                  (cons new-coll (process new-coll))))))]
    (process seed)))

meow 2015-09-25T22:33:07.000163Z

There are some L-system examples here: https://github.com/decomplect/ion/blob/master/examples/ion/ergo/l_system_examples.cljc

meow 2015-09-25T22:34:35.000165Z

Those examples show a range of features, letting you express more and more in the rules

2015-09-25T22:34:36.000166Z

looks cool. Have you worked on game of life?

meow 2015-09-25T22:34:45.000167Z

yes

meow 2015-09-25T22:35:16.000168Z

its in the core file as an example: (-> (ca-builder :conway-game-of-life cell (pattern :acorn)) (nth 10))

2015-09-25T22:35:42.000169Z

heh ah nice ok

meow 2015-09-25T22:35:58.000170Z

I started putting the various rules in a map:

(def cellupedia
  {:conway-game-of-life
   {:S #{2 3} :B #{3} :N neighbor-freq-8}
   :gnarl
   {:S #{1} :B #{1} :N neighbor-freq-8}
   :replicator
   {:S #{1 3 5 7} :B #{1 3 5 7} :N neighbor-freq-8}
   :fredkin
   {:S #{1 3 5 7 9} :B #{1 3 5 7 9} :N neighbor-freq-9}
   })

2015-09-25T22:36:52.000171Z

Very nice, I recognize how you’ve done the survive/birth thing. Can you support CA’s with > 2 states?

meow 2015-09-25T22:37:32.000172Z

Like I did with the L-systems, I want to push the CA stuff to the limits.

meow 2015-09-25T22:37:58.000173Z

So multiple states and cells with other attributes, like age or color.

meow 2015-09-25T22:38:11.000174Z

Haven't done it yet, but that's the plan.

2015-09-25T22:38:13.000175Z

right, nice

2015-09-25T22:38:38.000176Z

Brian’s brain and wireworld are some cool ones with 3 or 4 states

meow 2015-09-25T22:39:35.000177Z

Yeah, I haven't done those before, so it should be interesting.

meow 2015-09-25T22:39:56.000178Z

But this is LISP, so I should be able to do anything, right? :simple_smile:

2015-09-25T22:40:21.000179Z

hah indeed. These are fairly straightforward/typical but I don’t htink they are representable with survival/birth

meow 2015-09-25T22:40:51.000180Z

I also want to look into the predator/prey type CAs as well.

2015-09-25T22:41:12.000181Z

The langton’s ant/termite one suggests an “actor model” type of CA too

2015-09-25T22:41:31.000182Z

if this is helpful at all, it is consumed by some nasty C code: https://github.com/calebsmith/automaton/blob/master/rules/brain.rule

meow 2015-09-25T22:42:11.000184Z

My plan is to attempt to do them all, while abstracting out the commonalities and decomplecting as I go, so that the resulting functions can be recombined in ways that haven't been done before, rather than just doing the same old same old.

2015-09-25T22:42:27.000185Z

right

meow 2015-09-25T22:44:35.000186Z

Putting it all in one file and making existing functions (like the process function that I love so much) work for all cases, is forcing me to look at these problems from a different point of view that I think will be useful and meaningful. Plus the goal is to use these to generate data to drive the creation of music, so that's different as well.

meow 2015-09-25T22:45:44.000187Z

Gotta take a break. Will look at your code. Any kind of feedback on my stuff is most welcome as well.

2015-09-25T22:46:34.000188Z

Sure thing. I’ll spend some time wrapping my head around it. LMK if I can be help WRT music theory or if somehow my CA work can be of use (though I doubt that part)

2015-09-25T22:46:48.000189Z

(mostly made that project to exercise some C chops and learn how to integrate Scheme)

meow 2015-09-25T22:47:12.000190Z

Yeah, like I said I really know very little about music theory so I'd love to have someone help with that.

meow 2015-09-25T22:47:24.000191Z

Thanks. :simple_smile:

2015-09-25T22:47:48.000192Z

np, and thank you.

meow 2015-09-25T23:06:50.000193Z

@csmith: The docstring in this file will get you up to speed on L-systems really fast: https://github.com/decomplect/ion/blob/master/src/ion/ergo/l_system.cljc

meow 2015-09-25T23:07:21.000195Z

That's where I had the code before I moved it into core, so the code is bit out of date, but the docstring still applies.

meow 2015-09-25T23:08:50.000196Z

And I've got a devcard where I use ergo to draw a dragon fractal here: https://github.com/decomplect/ive/blob/master/src/ive/ergo/lindenmayer.cljs

meow 2015-09-25T23:10:12.000198Z

Basically it shows how to drive a turtle graphic, like this:

(defn dragon-sequence
  "Returns a lazy sequence of vectors."
  []
  (let [axiom [:F :x]
        rules {:x [:x :+ :y :F :+]
               :y [:- :F :x :- :y]}]
    (basic-system axiom rules)))

(def dragon-render-rules {:F [:fwd 20]
                          :+ [:right 90]
                          :- [:left 90]
                          \[ [:save]
                          \] [:restore]
                          :x []
                          :y []})

(defn dragon-render-sequence
  []
  (map #(into [] (comp (replace dragon-render-rules) cat) %) (dragon-sequence)))

meow 2015-09-25T23:10:59.000199Z

All you'd have to do to make music instead is to map some rules that change the render commands into Alda commands instead of turtle graphic commands.

meow 2015-09-25T23:11:56.000200Z

At least that's a starting point.