Tuesday, March 31, 2015

L-System Melody Assignment

To this assignment I am using the following L-System:
Koch Curve
Example:
Vocabulary: {A, B, C}
Start: A
Productions... A-> A B A C A C A B A
B-> B
C-> C
Derivation: G0= A
G1= A B A C A C A B A
G2= A B A C A C A B A B A B A C A C A B A C A B A C A C A B A C A B A C A C A B A B A B A C A C A B A

 For my melody, I will use G1.
A B A C A C A B A
My notes:
A=FQ AQ CQ AQ DQ CQ EQ DW
B=DQ EQ DQ EQ GQ
C=DQ FW DQ DQ FQ DQ

Final melody:

Title:

"This is far from a melody"

FQ AQ CQ AQ DQ CQ EQ DW DQ EQ DQ EQ GQ FQ AQ CQ AQ DQ CQ EQ DW DQ FW DQ DQ FQ DQ FQ AQ CQ AQ DQ CQ EQ DW DQ FW DQ DQ FQ DQ FQ AQ CQ AQ DQ CQ EQ DW DQ EQ DQ EQ GQ FQ AQ CQ AQ DQ CQ EQ DW


 Song

Monday, March 23, 2015

The ND (L-Tree+ CFG) melody generation task

Steps: 
  1) Generate the L-Treedefined by the following two sproot growing processes :

A|_ a _|B      B|_ b _|A

2)      Draw the three of level 5
3)      Twice derive a string of terminals from nonterminal BAR 3 in CFG for  that we have been  using – arranging for two different sequence  to result
4)      Associate A with the result of one bar 3 derivation associate B with the other result of bar 3 derivation.
5)      Replace each instance of A and B in the level 5 of the tree.
6)      Write down the melody that is generated as a sequence of JFugue symbols
7)      Generate a sound file

Result of each step:

1-2)
3)
Bar3 => (3 p3 d3)
            => (12) (3 pitch pitch pitch d3)
            => (26) (3 f pitch pitch d3)
            => (25) (3 f e pitch d3)
            => (28) ( 3 f e a d3)
            => (16) ( 3 f e a h q  q)
 Bar3 => (3 p3 d3)
          => (12) (3 pitch pitch pitch d3)
          => (23) (3 c pitch pitch d3)
          => (24) (3 c d pitch d3)
          => (25) ( 3  c d e d3)
          => (15) ( 3 c d e q h h) 
4)
 A =     FH EQ AQ
 B =   CQ DH EH

5)
A B B A B A A B B A A B A B B A B A A B A B B A A B B A B A A B

6)
FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH CQ DH EH FH EQ AQ CQ DH EH FH EQ AQ FH EQ AQ CQ DH EH

7)

Song

Monday, March 9, 2015

Recursive Transitional Network














































Song Generated using a die and the networks:
(1 e w) (4 f g a c h q i i) (3 c d e  q h q )( 2 a b h h) (4 c d g a h i i q ) ( 3 e d g q q h)(2 b b h h) (1 a w )

EW FH GQ AI CI CQ DH EQ AH BH CH DI GI AQ EQ DQ GH BH BH AW



Wednesday, March 4, 2015

Context Free Grammar Assignment 2

Production rules:
1)      Expression -> Symbol
2)      Symbol -> { Star } | [ Star ] | ( Star )
3)      Star -> “void”
4)      Star -> *
5)      Star -> * Star
6)      Star -> Symbol Star

Terminals: * [] {} () “void”
NonTerminals: Expression Symbol Star
Start Symbol: Expression
Test 1:
{[**][](***)}
Expression=>1 Symbol
                =>2 { Star }
                =>6 { Symbol Star}
                =>2 { [ Star ] Star}
                =>5 { [ * Star] Star}
                =>4 { [ * *] Star}
                =>6 { [ * *] Symbol Star}
                =>2 { [ * *] [Star] Star}
                =>3 { [ * *] [] Star}
                =>6 { [ * *] [] Symbol Star}
                =>2 { [ * *][] (Star) Star}
                =>5 {{**}[] (* Star) Star}
                =>5 {{**}[] (* * Star) Star}
                =>5 {{**}[] (* * * Star) Star}
                =>4 {{**}[] (* * * *) Star}

                =>3{{**}[] (* * * *) }
Test 2:
{}
Expression =>1 Symbol
                  =>2 { Star }
                  =>3 {}
Test 3:
[ (*) *]
Expression =>1 Symbol
                   =>2 [ Star]
                   =>6 [ Symbol Star ]
                   =>2 [ ( Star) Star]
                   =>4 [(*)Star]
                   =>4 [(*)*]


PDF

Monday, March 2, 2015

Context Free Grammar Assignment

In this assignment I was supposed to produce a melody using a context free grammar. Based in the grammar and using a generator of random numbers( to choose the rules), I did this directly derivations : 
             Note : The number before the string is the rule number.
Melody    => (1) bar bar bar bar bar bar bar bar
                => (2) bar1 bar bar bar bar bar bar bar
                => (6) (1 p1 d1) bar bar bar bar bar bar bar
                => (10) (1 pitch d1) bar bar bar bar bar bar bar
                => (23) (1 c d1) bar bar bar bar bar bar bar
                => (14) (1 c w) bar bar bar bar bar bar bar
                => (3) (1 c w) bar2 bar bar bar bar bar bar
                => (7) (1 c w) (2 p2 d2) bar bar bar bar bar bar
                => (11) (1 c w) (2 pitch pitch d2) bar bar bar bar bar bar
                => (24) (1 c w) (2 d pitch d2) bar bar bar bar bar bar
                => (23) (1 c w) (2 d d d2) bar bar bar bar bar bar
                => (15) (1 c w) (2 d d h h) bar bar bar bar bar bar
                => (4) (1 c w) (2 d d h h) bar3 bar bar bar bar
                => (8) (1 c w) (2 d d h h) (3 p3 d3) bar bar bar bar
                => (12) (1 c w) (2 d d h h) (3 pitch pitch pitch d3 ) bar bar bar bar
                => (26) (1 c w) (2 d d h h) (3 f pitch pitch d3) bar bar bar bar
                => (25) (1 c w) (2 d d h h) (3 f e pitch d3) bar bar bar bar
                => (28) (1 c w) (2 d d h h) ( 3 f e a d3) bar bar bar bar
                => (16) (1 c w) (2 d d h h) ( 3 f e a h q  q) bar bar bar bar
                =>  (3) (1 c w) (2 d d h h) ( 3 f e a h q  q) bar2 bar bar bar
                =>  (7) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 p2 d2) bar bar bar
                =>  (11) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 pitch pitch d2) bar bar bar
                =>  (29) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 b pitch d2) bar bar bar
                =>  (28) (1 c w) (2 d d h h) ( 3 f e a h q  q) (2 b a d2) bar bar bar
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) bar bar bar
                => (3) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) bar2 bar bar
                => (7) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 p2 d2 ) bar bar
                => (11) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 pitch pitch d2 )bar bar
                => (23) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c pitch d2 )bar bar
                => (27) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g d2 )bar bar
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h )bar bar
                => (2) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h )bar1 bar
                => (6) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 p1 d1) bar
                => (10) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 pitch d1) bar bar
                => (25) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e d1) bar
                => (14) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) bar
                => (3) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) bar2
                => (7) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 p2 d2)
                => (11) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w)(2 pitch pitch d2)
                => (24) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d pitch d2)
                => (28) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a d2)
                => (15) (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a h h)

 After that, I transformed the last string to a JFugue string :
Last String: (1 c w) (2 d d h h) ( 3 f e a a h q  q) (2 b a h h) (2 c g  h h ) (1 e w) (2 d a h h)

Result of the combination: cw dh dh fh eq aq bh ah ch gh ew dh ah

Finally, putting this string in the SimplePlayer it produced this song file: