Fork me on GitHub
#alda
<
2015-09-25
>
danielvagina07:09:26

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?

dave14:09:18

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

dave14:09:37

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

dave14:09:48

could you run the following and paste the output?

dave14:09:03

(in the same directory that you ran the above)

dave14:09:08

cat bin/alda

dave14:09:16

bin/alda version

dave14:09:20

boot --version

dave14:09:24

java -version

dave15:09:19

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" 🎶

dave15:09:38

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

danielvagina16:09:47

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

danielvagina16:09:59

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

dave17:09:13

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

dave17:09:32

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

piano: c d e f g a b > c

meow21:09:03

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

meow21:09:36

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.

csmith21:09:07

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

csmith21:09:52

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

csmith22:09:05

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

csmith22:09:05

@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

meow22:09:54

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

csmith22:09:29

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

csmith22:09:59

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

meow22:09:42

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.

meow22:09:39

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

meow22:09:28

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

meow22:09:14

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

csmith22:09:50

sounds cool

csmith22:09:46

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

meow22:09:48

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.

csmith22:09:57

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

csmith22:09:24

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

meow22:09:11

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)))

meow22:09:35

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

csmith22:09:36

looks cool. Have you worked on game of life?

meow22:09:16

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

csmith22:09:42

heh ah nice ok

meow22:09:58

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}
   })

csmith22:09:52

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

meow22:09:32

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

meow22:09:58

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

meow22:09:11

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

csmith22:09:13

right, nice

csmith22:09:38

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

meow22:09:35

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

meow22:09:56

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

csmith22:09:21

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

meow22:09:51

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

csmith22:09:12

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

csmith22:09:31

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

meow22:09:11

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.

meow22:09:35

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.

meow22:09:44

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

csmith22:09:34

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)

csmith22:09:48

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

meow22:09:12

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

meow22:09:24

Thanks. simple_smile

csmith22:09:48

np, and thank you.

meow23:09:50

@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

meow23:09:21

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.

meow23:09:50

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

meow23:09:12

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)))

meow23:09:59

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.

meow23:09:56

At least that's a starting point.