Open vs. Closed Source

In an ideal world, all software would be open source but people would still pay to use it. The programmers would be compensated for their work, if they chose to charge for the software, and the end users could modify the program to their needs, and only distribute the results if the programmers allow it.

Unfortunately, this probably won’t occur in the real world – pirating would be far more common than buying software, just as Bill Gates says it was so for BASIC in 1976. Currently, the programmer(s) are the ones who should decide whether the software is open or closed source.

Professional programmers would follow Bill Gate’s philosophy put forward in his letter to hobbyists, that they must have adequate compensation in order to be motivated to continue working on software. Amateur programmers spending a lot of time on a program might do the same as well.

However, those working on smaller programs or who simply feel like sharing with the community in line with the philosophy of Gnu would make their software open source. Personally, I am for open source so long as it does not conflict with the programmer’s ability to benefit from the program how they desire to.

And, to me, an operating system is the interface between the user and the hardware, what turns the 1’s and 0’s of a computer into something understandable and useful to the user.

Advertisements

Prolog and Logic Programming

Prolog: cafeteria(M) :- flavor(M).
flavor(chocolate).

——————————————————–

spouse(X,Y) :- parent(X,Z), parent(Y,Z).
sibling(X,Y) :- parent(Z,X), parent(Z,Y).
mother(X,Y) :- parent(X,Y), female(X).
uncle(X,Y) :- parent(Z, Y), sibling(Z,X), male(X).
female(mary). male(john). male(kevin). male(andrew).
parent(mary, kevin). parent(mary, andrew).
parent(john, kevin). parent(john, andrew).

Stable Model: parent(john,andrew) parent(john,kevin) parent(mary,andrew) parent(mary,kevin) male(andrew) male(kevin) male(john) female(mary) sibling(andrew,andrew) sibling(kevin,andrew) sibling(andrew,kevin) sibling(kevin,kevin) mother(mary,andrew) mother(mary,kevin) spouse(john,john) spouse(mary,john) spouse(john,mary) spouse(mary,mary)

In logic programming, everything happens at once. This is so because there is no state change in the program, it simply returns what is true based on what it knows and the constraints given to it by the user.

EPGYAuthor

Here is a sample output of my EPGYAuthor, sampling 50000 characters of the Bible with a Markov order of 10.

EPGYAuthor sc

 

My program stores each separate string in a Map of strings and arraylists. The string is one of each unique 10 character string found in the text sample, and the arraylist stores a collection of long values, who, once operated on bitwise accordingly, contain a char and the number of times that char followed the string.

Autonomy and Agency

Thermometers and thermostats are excellent examples of what autonomy and agency mean in the world. A thermometer measures the temperature and figures out what it is on its own; this is autonomy, where one is able to make one’s own decision and operate independently. The thermostat, on the other hand, affects the temperature of the room; this is agency,  one’s ability to act in and affect the world around them.

For computers, autonomy is their ability to function on their own without immediate from another entity. Currently, computers have low autonomy; they usually only do what a user tells them to do. Computers do have autonomy, or the ability to cause change, however, especially those connected to physical systems such as, well, AC units or power grids. In these scenarios the computer has the ability to respond to and affect the world.

For me, autonomy is my own ability to think and decide on my own, not necessarily ignoring the ideas of others but not being controlled by them either. It is ability to examine a situation and have complete personal control over the conclusions I draw. Agency for me is my ability to affect the world and decide when and how I will do so, choosing the situations where I wish to act and how I am going to do so with a specific outcome in mind.

Final Project: CliffComp Melody Generator

Abstract: Algorithmic Music Composition is the use of computer algorithms to create music without human intervention. A variety of methods and sources are used to create this music, ranging from short, pre-loaded pieces of music to the math of objects based in Wolfram’s computational universe. My  program, CliffComp, aims to algorithmically create a piano melody based on input dictating the mood of the music.

Introduction: The aim of CliffComp is to algorithmically create a melody based on the inputted mood. Based on the combination of input, the program will alter the models which it uses to generate the score. During the course of the project various methods of composition will be investigated, including mathematical models, knowledge based systems, grammars, and evolutionary models.

In mathematical models, music is generated based on mathematical equations and input such as fractals; in knowledge based systems, the program bases its generated music on isolated pieces of music loaded into its memory; in grammars, music is generated based on predefined rules; and finally, evolutionary models, the program randomly alters music and based on user feedback the composition will eventually evolve into a suitable piece[1].

In the end, CliffComp will employ a hybrid system, in which some or all of these methods of composition will be used to generate the final composition[1]. And, the compositions based on this system will be affected by the mood input given by the user.

Application:  CliffComp could be applied in a variety of programs to create procedurally generated music every session based on the mood the program desires to create. A specific example of this would be a video game, which could supply  CliffComp with data on the current mood of the game, and  CliffComp would generate music accordingly, saving money for game developers and creating a more interesting and interactive experience for the end-user.

Previous Work: A variety of programs currently exist that generate music algorithmically. ImproVisor, created by Harvey Mudd, is a score-writer with the ability to generate licks and parts of solos using Markov chains and context-free grammar[4]. Lexikon-Sonate, by Karlheinz Essl, generates potentially infinite piano pieces based on the analysis of piano music by famous composers such as Mozart and Bach[3]. Finally, several programs exist that convert various forms of data, such as infinite constant like pi or programs from Wolfram’s computational universe, into music[2][5].

Current Problems in the Area: Current problems in algorithmic music composition mostly include simply making the music sound better – many algorithms can currently create music difficult to distinguish from that created by a human[6]. The more pressing issue is how good the compositions sound, rather than how human-like they are.

Proposed Solutions: Making music sound better will simply take time and fine tuning of the final method of composition. More important for this version of CliffComp will be making music that is adequately influenced by the mood input, which will require adjustments on the composition model for each set of mood parameters.

Mood Input Diagram

Conclusion: Overall, CliffComp aims to use a hybrid algorithm to algorithmically create and save a piano melody based on the mood inputted into the program. Each mood parameter will result in the appropriate adjustment in the algorithm.

Future Work:  CliffComp currently will only generate the melody using a single instrument, the piano. Future work will involve the use of different types of instruments as well as the ability to create appropriate melodies, bass, and percussion lines. Finally, the mood input that  CliffComp can take should be widely expanded in order to create a more finely tuned composition for the actual mood.

References:

  1. http://en.wikipedia.org/wiki/Algorithmic_composition
  2. http://tones.wolfram.com/about/
  3. http://www.essl.at/works/Lexikon-Sonate.html#abo
  4. http://www.cs.hmc.edu/~keller/jazz/improvisor/
  5. http://musicalgorithms.ewu.edu/algorithms.html
  6. Supper, M. 2001. “A Few Remarks on Algorithmic Composition” Computer Music Journal 25.1 (2001) 48-53

Amazon Book:

http://www.amazon.com/Algorithmic-Composition-Paradigms-Automated-Generation/dp/3211999159/ref=sr_1_2?s=books&ie=UTF8&qid=1374874516&sr=1-2&keywords=Algorithmic+Music

Possible Conference

One interesting conference for algorithmic music generation is the International Computer Music Conference. Last meeting during September in Ljubljana, Slovenia, the ICMC encompasses every part of music in which computers are involved in its creation. Especially interesting for me would be the the papers presented on various aspects of algorithmic music composition each convention, ranging from the generation of harmonies to the construction of percussion lines.