Unformatted text preview:

Curtis Henkel Matthew Duane Chatura Atapattu Kevin Ramkishun TONEDEF Motivation Create C a language l f the for h M Musical i l Computer C Scientist Bring the h semantics off musicall composition to a programming language Flexible enough for a variety of uses Simple music creation Algorithmic music creation Language Overview Imperative I i programming i llanguage Statically scoped weakly typed Types are immutable No pointers No polymorphism of function names Comments Source file is piped in and optional output file can be piped out out Types int boolean string pitch sequence beat note chord phrase rhythm void digits only true or false chars inside double quotes A G b 0 9 comma separated list of ints inside rational numbers pitch beat set of notes ordered list of chords 1 0 within void Operators Arithmetic A ith ti Comparators Unary Note Chord Manipulation Phrase Manipulation Assignment Function Declarations type function func name func name type name list body Program is a list of function declarations Applicative pp order Pass by value parameters Special functions main print play Syntax Overview expression literal unop expr expr binop expr name expr list name expr expr list name statement expr p if expr p stmt else stmt for expr expr expr stmt while expr stmt foreach type name in expr stmt return expr stmt list type name expr Example p Program g Phrase Creation void function main note n C5 1 4 sequence s for int i 0 i 10 i i 1 s s x Creates a sequence phrase p n reverse reverse sequence s sequence s Creates phrase using note and sequence play p sequence function reverse sequence sequence in seq sequence s foreach int x in in seq s x s return s Language Implementation Source Code tdf df Input Scanner Tokenized Input Parser Syntax Tree Compiler Bytecode d Bytecode Interpreter JFugue Java Output M i Music Sample Bytecode void function main f foreach h i int i i in 4 4 5 6 5 6 print i n Output 4 5 6 0 Jmp p 2 9 Combine 17 Concat 1 Hlt 10 Bra 10 18 Jmp 1 2 Entry 1 11 Decompose 19 Pop p y sequence q 3 PushEmpty 12 Store 1 20 IsEmpty p y 4 PushInt 6 13 Pop 21 Beq 10 5 Combine 14 Load 1 22 Pop 6 PushInt 5 23 PushInt 0 7 Combine 15 ConvertType int string 8 PushInt 4 16 PushString n 24 Ret 0 Stack type mbeat int int numerator denominator type mnote int mbeat pitch beat type mchord mnote list list of notes type mphrase mchord list list of chords type msequence int list MemInteger of int MemString of string MemPitch of int MemBool of bool MemBeat of mbeat MemNote of mnote MemChord of mchord MemPhrase of mphrase MemSequence of msequence MemRhythm of string Frame pointer Argument 2 Argument 1 Return Address Old Frame Pointer Local 1 Local 2 MemChord mchord mnote 61 mbeat 1 2 MemNote mnote 65 5 mbeat 1 4 MemString string Quicksort Music MemBeat mbeat 1 4 MemInteger 42 How We Collaborated Source Code Control Subversion Hosting by Assembla com St Stress ess frequent eque t co commits ts Automatic E Mail on new commits to notify team members Google G l Documents D Collaborative editing on all documents and presentations p Proposal Task List LRM Presentation Final Report Instant Messaging E Mail conversations Impromptu meetings after class as required Lessons Learned KISS Keep K i Simple it Si l Stupid S id clich li h we kknow Everything is just an integer or a string Iff you don t have an easy solution just add another layer of indirection Orthodox stack Object based stack Summary Conclusion Successfully S f ll implemented i l dT Tonedef d f per the h Language Reference Manual Future work k Overlapping phrases User interaction in program Command arguments Different Diff iinstruments tempo and d time i signature i


View Full Document

Columbia COMS W4115 - TONEDEF

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Loading Unlocking...
Login

Join to view TONEDEF and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view TONEDEF and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?