Automated Musical Part Writing Kevin Deisz. Input  Positive integer - dictates the number of chords to be created  Instrument file (python) - file that.

Slides:



Advertisements
Similar presentations
Voice Leading in Four Voices Rich Harris Jr. Root Position When two roots lie a P5 or a P4 apart: –Keep common tone ( tone shared by both triads) and.
Advertisements

Chapter 2: Rhythm and Pitch
COSC513 Operating System Research Paper Fundamental Properties of Programming for Parallelism Student: Feng Chen (134192)
1 C++ Syntax and Semantics The Development Process.
Arrayed Maps An excellent way to review at the end of a unit. This activity results in a bulletin board displaying an array of phenomena maps developed.
Chapter 10 Introduction to Arrays
Recursion. Idea: Some problems can be broken down into smaller versions of the same problem Example: n! 1*2*3*…*(n-1)*n n*factorial of (n-1)
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 14 – Student Grades Application: Introducing.
Multi-Objective Evolutionary Algorithms Matt D. Johnson April 19, 2007.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 9 Structures and Sequential Access Files.
Understanding Arrays and Pointers Object-Oriented Programming Using C++ Second Edition 3.
CS 117 Spring 2002 April 5, Exam 3 April 10 –files, arrays, strings, classes –practice exams are up –review on Monday.
 2003 Prentice Hall, Inc. All rights reserved Sorting Arrays Sorting data –Important computing application –Virtually every organization must sort.
Chapter 11 Structure. 2 Objectives You should be able to describe: Structures Arrays of Structures Structures as Function Arguments Dynamic Structure.
In a not gate, if the input is on(1) the output is off (0) and vice versa.
Introduction to Parallel Programming MapReduce Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under.
The foreach LooptMyn1 The foreach Loop The foreach loop gives an easy way to iterate over arrays. foreach works only on arrays, and will issue an error.
Baroque-Era Algorithmic Composition Kevin Deisz. 1st Step – Keys Number all of the keys on the piano Everything is in the key of C.
Chapter 13 File Structures. Understand the file access methods. Describe the characteristics of a sequential file. After reading this chapter, the reader.
Voice Leading in Four-Part Chorale Writing
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Chapter 10 Applications of Arrays and Strings. Chapter Objectives Learn how to implement the sequential search algorithm Explore how to sort an array.
Today’s topics Parameter passing on the system stack Parameter passing on the system stack Register indirect and base-indexed addressing modes Register.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 5 – Dental Payment Application: Introducing.
Arrays An array is a data structure that consists of an ordered collection of similar items (where “similar items” means items of the same type.) An array.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Built-in Data Structures in Python An Introduction.
Chapter 2 Pseudocode. Objectives To introduce common words, keywords and meaningful names when writing pseudocode To define the three basic control structures.
ADVANCED PLACEMENT MUSIC THEORY Adding Harmony to a Melody.
Chapter 4 Practice cont.. Practice with nested loops 1.What will be the output of the following program segment: 1.for (int i = 1; i
Arrays II (Strings). Data types in C Integer : int i; Double: double x; Float: float y; Character: char ch; char cha[10], chb[]={‘h’,’e’,’l’,’l’,’o’};
Relations Relation: a set of ordered pairs Domain: the set of x-coordinates, independent Range: the set of y-coordinates, dependent When writing the domain.
Positive and Negative numbers. Negative numbers A positive or negative whole number, including zero, is called an integer. For example, –3 is an integer.
A FIRST BOOK OF C++ CHAPTER 16 DATA STRUCTURES. OBJECTIVES In this chapter, you will learn about: Single Structures Arrays of Structures Structures as.
READING AND WRITING FILES. READING AND WRITING FILES SEQUENTIALLY  Two ways to read and write files  Sequentially and RA (Random Access  Sequential.
Variables and Assignment CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Functions: Part 2 of /11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park 1.
Copyright © 2002 W. A. Tucker1 Chapter 9 Lecture Notes Bill Tucker Austin Community College COSC 1315.
1 Objectives ❏ To understand the differences between text and binary files ❏ To write programs that read, write, and/or append binary files ❏ To be able.
Note Values and Key Signatures. Bar lines Separate Measures Each bar line creates a new measure.
Gator Engineering Google Code Jam 2015 Copyright © 2008 W. W. Norton & Company. All rights reserved. 1.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the differences between text and binary files ❏ To write programs.
CS 116 Object Oriented Programming II Lecture 13 Acknowledgement: Contains materials provided by George Koutsogiannakis and Matt Bauer.
The Music Staff How we read and write music Music is made up of sounds that we hear. We can make the sounds by singing or by playing instruments.
CIT 590 Intro to Programming Lecture 6. Vote in the doodle poll so we can use some fancy algorithm to pair you up You.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
OPERATORS IN C CHAPTER 3. Expressions can be built up from literals, variables and operators. The operators define how the variables and literals in the.
DATE S. S.. Sandstone The sandstone carries out the following tasks: 1. Set up target platform environment, 2. Load a bootable image into memory, 3. Relinquish.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
1 Lecture 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line of Text 2.3Another Simple C Program: Adding.
User-Written Functions
Functions & Graphing.
Relations and Functions
2-1 Relations and Functions
Bell Ringer Using the first two (choral) works from the packet handed out when you arrived to class today, analyze the use of notation for the vocal parts.
AP Music Theory Mr. Silvagni
Binary Files.
More Loops.
Four Part Writing Rule #1: Know thy range, and stay in it!
Functions, Part 2 of 3 Topics Functions That Return a Value
Function Rules and Tables.
Writing Functions( ) (Part 4)
x-Value = The horizontal value in an ordered pair or input Function = A relation that assigns exactly one value in the range to each.
5.2 Relations and Functions
Introduction to Functions
X Y Relation (a set of ordered pairs) x y x y ( , ) x y Mapping
Relation (a set of ordered pairs)
Functions, Part 2 of 3 Topics Functions That Return a Value
Functions, Part 2 of 3 Topics Functions That Return a Value
Presentation transcript:

Automated Musical Part Writing Kevin Deisz

Input  Positive integer - dictates the number of chords to be created  Instrument file (python) - file that is written to dictate certain rules in order to write for different ensembles  Positive integer - dictates the number of chords to be created  Instrument file (python) - file that is written to dictate certain rules in order to write for different ensembles

Process  Creates an array of size that was input  Follows the chord progression map for a major key to fill up the entire array with random new chords  Creates an array of size that was input  Follows the chord progression map for a major key to fill up the entire array with random new chords

Process - Domains  Creates four arrays - one for each instrument that was input  Loops through a newly created map and adds all possible values for voice for each chord to the corresponding array  Creates four arrays - one for each instrument that was input  Loops through a newly created map and adds all possible values for voice for each chord to the corresponding array

Process - Constraints  Spacing error - no two voices can be more than one octave apart (more than 7 notes between)  Voice crossing error - higher voices cannot go lower than lower voices and vice versa  Spacing error - no two voices can be more than one octave apart (more than 7 notes between)  Voice crossing error - higher voices cannot go lower than lower voices and vice versa

Process - Constraints (cont.)  Parallel fifths - no two voices can move in the same direction and end and begin with 4 notes in between  Parallel octaves - same as parallel fifths except with 7 notes in between  Parallel fifths - no two voices can move in the same direction and end and begin with 4 notes in between  Parallel octaves - same as parallel fifths except with 7 notes in between

Process - Constraints (cont.)  All of these constraints can be broken down into binary constraints - all one function

Process - Constraints (cont.)  A new map is created in which every voice is added  Every voice then has a corresponding array of pairs that contain neighbors and a pointer to the function  A new map is created in which every voice is added  Every voice then has a corresponding array of pairs that contain neighbors and a pointer to the function

Process - CSP  All three maps - assignments, domains and constraints - are then passed to the csp function  Since all of the constraints were already given and all of the possible values already calculated - the music is returned  All three maps - assignments, domains and constraints - are then passed to the csp function  Since all of the constraints were already given and all of the possible values already calculated - the music is returned

Extra Methods  At this point, the basic arrays of notes are returned  Top two voices are then passed to an ornamentation method, which adds eighth notes  Another method makes the last note a whole note  At this point, the basic arrays of notes are returned  Top two voices are then passed to an ornamentation method, which adds eighth notes  Another method makes the last note a whole note

Output  The python program outputs a text file in the format of a lilypond file  Python program then executes the lilypond utility (“lilypond --png file.ly”)  File is then displayed on a webpage   The python program outputs a text file in the format of a lilypond file  Python program then executes the lilypond utility (“lilypond --png file.ly”)  File is then displayed on a webpage 