Looking for evolutionary music example code [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I would like to implement an interactive evolutionary algorithm for generating music (probably just simple melodies to start with).
I'd like to use JFugue for this. Its website claims that it is well-suited to evolutionary music, but I can't find any evolutionary examples.
I already have a framework to provide the evolutonary machinery. What I am looking for is some simple, working code that demonstrates viable approaches for the musical part (e.g. suitable encodings and evolutionary operators for the evolved tunes).
I have some ideas how it might be achieved, but I'm not particularly knowledgeable about music theory, so to start with I'd like to just reimplement something that is known to work.
So does anybody have, or know of, any freely available code (any language is fine) that demonstrates one or more approaches to evolutionary music?
EDIT: I'm specifically looking for evolutionary code rather than other techniques that could be used for music synthesis.

You probably want to look into Markov Chains - They're probably of more use to you than an evolutionary algorithm to start with, as judging the quality of the output in order to breed the best is going to be a nightmare (subjective and time-consuming), and they're ideal for combining with evolutionary programming.
There's a good introduction to them on Coding Horror. The article explains the concept and demonstrates the remarkable results, the comments mention music a lot more (I was lost for hours in the comments and the sites they linked to). There's some more specific details and further reading on Wikipedia.
Markov chains have an element of probability to them, so this is where you can combine them with evolutionary programming - by evolving a method of choosing alternatives other than the roll of a dice.

So far I've found only this, which is a genetic programming example in C.
Update (January 2010): And this online system, which doesn't have source code but is an example of what can be achieved. I also found Grammidity, which allows for sequences of MIDI events to be evolved from grammars.
Update (July 2011): I've just found some relevant Python code on the MIT Open Courseware site.

There is some research going into using Cellular Automata for generating music. As with all other music generation, it is really a question of mapping rather than generation. You could use pretty much anything as input as long as you define your mapping so that it sound "good" (well I guess interesting is a better word).
Googling "cellular automata music" gives quite a few hits. Another good source for information is the Computer Music Journal if you can get access to their archives.

Related

What programming language (and IDE) is better suited for the refactoring Gilded Rose problem? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I would like to challenge myself with The Gilded Rose Problem. For the ones unfamiliar with this popular interview assignment, Brad Cypert gives some tips and a general introduction a in one of his blog posts. You can find it here.
In general, it is a problem about refactoring where you should meet some requirements by implementing additional functionalities by operating on a piece of (crappy) legacy code.
This challenge can be taken in most of the popular languages and I think that the combination between language and IDE (for refactoring purposes) is crucial to differentiate a great solution from an OK one. I was thinking about combining IntelliJ, since I have experience with it and I think it is great for refactoring and Java, since it is one of the language I am more comfortable with. However, any other recommendation is more than welcomed and I will be happy to try and experiment with new languages and tools.
Lastly, I was wondering whether someone could provide any guidelines or a more detailed tip based on past experiences about this problem.
You can choose any language and an IDE you are familiar with.
The Gilded Rose Problem is an example of bad code. You can train refactoring with this code. Refactoring is not only what can be supported directly by the IDE. Normally you should also think about the code if there is something that can be expressed in a simpler way.
It does not much depend on the language, according to Nikolaus Wirth (inventor of PASCAL): "A poor programmer can produce bad code in any language."

Learning JavaCV in pure Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to learn JavaCV. As you all know, the lack of educational materials on this subject is a very big problem. In JavCV home page, they have provided lot of examples for the C++ examples in book "OpenCV CookBook". But the case is, they are not Java, they are in SCALA!!!! Now I have already gone crazy! I know lot of examples are in web, but I want to learn it from beginning to advance, then only I can do it properly. "OpenCV CookBook" is a very good book but it is all about OpenCV in C++, not anything about Java.
Someone please help me to find a better place to learn JavaCV. Provide me whatever, URL, Book, etc. But it must be about learning JavaCV in 100% Java, not in Scala, C++, C or whatever other language! Please help!
< update >
Times change - and so does OpenCV. Right now, a pure Java wrapper (not Android) is growing fast, allowing anyone to use OpenCV functions directly in desktop Java apps/
< /update >
You can find some tutorials in Java in the OpenCV samples directory: samples/android.
You can also find some more info here.
Now, I am pretty sure you will say you want Java, but not Android :). But this requires an explanation.
For various reasons - the main one being efficiency and the second one portability to embedded platforms, computer vision is done almost entirely in C/C++. It is the de facto standard. Everybody uses it, with good reasons, and good results.
There are different adapters to the C++ code base, like Python and Java, but they exist to fill some specific gaps: Python is used for fast prototyping, and Java for interfacing the Android main language. But in all scenarios, the 'real' algorithm development is done with C/C++. This is why nobody cares about tutorials/books/examples in other languages.
Conclusion: If you want to learn image processing, learn C++ or Python. If you want to build some app, learn the OpenCV java interface from docs/android tutorials. But do not expect flexibility or control over performance.
Updated note
There are two more things to specify here.
First, as Android gets on its wheels, and Python proves more and more popular, the content available in the two languages (and others) are increasing dramatically. But for the years to come, the core development group - and the best docs - will be in the C++ area.
Last, but not least, you should keep in mind that in any work or programming area, if you stick to one language, you're dead. Principles matter, and you should be able to implement them in a variety of languages, and you should be able to read and understand from a variety of sources. What about a programmer that says he is not able to translate pseudo-code into Java? It's quite the same with other languages.
You can read the great blog post Don't call yourself a programmer to understand why you should forget about programming in one language.

Any suggestions on learning Data structures and algorithms for java developers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What algorithms should a java developer(or maybe a better question would be a software developer in general) should know. I have Introduction to Algorithms by Cormen and Algorithms by Richard Johnsonbaugh at hand. Would going through their content be overkill?
from amazon data structures and algorithms in java
What algorithms should a java developer(or maybe a better question would be a software developer in general) should know.
There are no any specific Algorithms for C developers or for a Java developer. Algorithms is a "main" part of the Computer Science and here is the topic What algorithms should every developer know? and here Best source for Algorithms? and Good Data Structures text book
That's a very open-ended question, so a concise and useful answer is difficult. I would say that you need to know at least the data-structures and associated algorithms that Java provides in the standard libraries so that you know how and when to use each one. If you don't know the differences in structure and performance between an ArrayList and a LinkedList then you won't know when each one is appropriate. Similarly, if you don't know how a HashMap works then you can't know how to properly define classes that can be stored in one.
It's also instructive to learn a couple of different sorting and searching algorithms, for similar reasons.
This question here better answers what you ask.
It doesn't hurt to know stuff like that, but it will rarely come up*.
*Depends on what you're doing.
The CLRS is probably the most widely used one and reading it is definitely not overkill, just skip the proofs (I would read them just to enjoy, but not too much practical use). You may also want to check this one.

Examples of Object-Oriented Projects Help Procedural Programmers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Please help me identify some small to medium sized open source projects that embody object oriented design (preferably in C++ or Java). I would like to use these projects to demonstrate how real world problems (as opposed to contrived text book examples) can be solved with an object oriented design. I want to be able to present a plausible explanation of why certain things were chosen to be objects and how they all work together to solve a problem.
Google Chromium (C++): windows, tabs, plugins etc. are all classes.
The Unreal Tournament Public Source Code (432 Headers) contains the declarations of the Unreal engine class library written in C++. I found it to be a rich example of a large object-oriented program. It taught me a lot about how to modularize and object-orient my code. It also demonstrates many tactics for getting a handle on a large code base.
Also, because all you can read are header files, you'll have a fun (and educational) time trying to figure out how the whole thing comes together. (I actually ended up writing my own x86 disassembler so I could cheat and read some of the definitions!)
On the same note, the Doom 3 SDK contains a large chunk of the Doom/Quake engine written in very readable C++.
Just about any large project designed in Java is object-oriented, almost by definition. You can take a look at Apache Hadoop as a large-scale, open-source, objected oriented project written in Java. Another is Apache Ant.
Eclipse would be a good example on the Java side: the plugin architecture is all object oriented.
I asked the same thing to my OO mentor. He pointed me to the JUnit sources, with the recommendation to see how it evolved version by version. This would show you how Kent Beck writes Java code.
Another example on this vein would be the sources of Fit by Ward Cunningham.

Best resources for a Java developer working on .NET solutions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
My company has acquired several companies lately. We are a Java shop but have both VB .NET and C# .NET code bases now. I am about to start supporting these systems and am having trouble find good resources for finding the parallels/differences in .NET and Java. I have seen a few books but cannot decide which to buy, they all seem basically the same. It would be nice if anyone knows of resources that are online instead of having the information buried in a 700 page black and white book.
Specifically, I would like to find some resources that compare the macro and micro level differences. Including things like "what is the .NET equivalent of HashMap, ArrayList and Queue", and "How do I interact with a database" or "What are the differences between ASPs and JSPs".
I am really looking for some opinions about which resources are the best from people who have been in a similar situation (Java developer to .NET).
Thanks.
Read this, most importantly the Programming Guide, and bookmark the Reference.
I'm from a Java background and recently started using C# and found the MSDN very helpful. The auto-complete search field often found me the reference page I was looking for.
Force yourself to learn LINQ. It's beautiful once it clicks.
MSDN. Seriously, MSDN is quite possibly the best-technical level documentation there is for the nuts and bolts of the C# libraries. Alternately, if you want a more exhaustive treatment, something like "CLR via C#" by Jeffrey Richter really gives you a good feel for what the CLR is capable of.

Categories