Random "Music" - Raymond Lum

From WeKey
Jump to navigationJump to search

PHYS 210 PROJECTS --> here

Ideas

Ideas go here. When I think of them. Hmm...

Science Tools

Okay, one idea I thought of was a program within Matlab (or Octave) that would be like a science toolkit (or, physics, rather).

If in Matlab, it could have an interactive click menu directing you to various functions and equations, displaying the equation itself, and places where you enter the parametres of the functions. It will display the constants used in the equation, and I may also put a place in the main menu where a list of physical constants is included. I may divide the menu into subsections for easier function browsing. An advantage is that I might be able to integrate graphics into it, so the equations don't look like that ever so pleasant jumbling, ASCII math.

I'm not entirely clear on what you envision -- all possible functions & equations of relevance to physics? That's a lot of functions & equations! Probably you'd be better off picking one particular type of equation (e.g. some class of differential equations) and showing (with pretty graphics) its solutions under different circumstances. This is a favourite type of P210 project. Just showing the equations (and not their solutions) would not involve any computation at all, so that wouldn't qualify. -- Jess 09:45, 4 October 2008 (PDT)

Alternatively, I could (in either Matlab or Octave), create a program (call it 'scitools') that'll display all the menu options within the command window, and ask the user to put in a number to proceed to whichever section. The advantage of this is that it is able to utilize vectors and matrices (though I will have to adjust how equations are calculated), and spit out answers that way. Plus there'll be no clicking, which I know certain individuals are not too fond of. It may mean I have to put in a lot of messages when users try to put in parametres that are not in the selection (such as choosing between 1 and 10, but the user puts in an "A").

Au contraire, I have no reluctance to point & click, if that will accomplish what I want to do. See muview, my pride & joy. The reason I insist that you learn to use the command line is that there are many things you simply cannot do with a mouse. If the only "verbs" in your sentences are point, click, drag and drop (and maybe right-click & middle-click) you are forced to negotiate an endless sequence of pull-down menus listing all possible options, when what you want can be expressed in one or two characters on the command line. How would you like to use a mouse to construct an arbitrary English sentence? Using a mouse is like choosing a meal from a menu in a restaurant; the command line is like having a personal chef who will cook anything you ask for, any way you want it. (Unfortunately the chef speaks a very obscure language, which you therefore have to learn.) -- Jess 09:45, 4 October 2008 (PDT)

I will make separate functions for each equation, and have the main function as the unifying element. That way, I am still able to use these functions outside of 'scitool', as well. It may also be helpful to know which ones already exist, but I am up for reinventing the wheel, regardless. I've thought of potential energy problems with multiple objects, if there's a way to create a function that'll take all the objects, with their respective distances to each other (as some sort of matrix), and spit out an answer.

I didn't follow the first couple of sentences there; what do the functions do? The potential energy idea is interesting, except that I don't know what you mean by "an answer". What is the question? It would be challenging but interesting to show an animation of a bunch of particles interacting via some potential like the Lennard-Jones potential (a good approximation for some intermolecular forces) and then let them move under that potential, showing in one corner the total potential and kinetic energies of the system as a function of time. If the particles never collide with each other but have specular elastic collisions with the walls of the box, this might look neat in 2D: start by sprinkling the particles around the container at random and then let them go (starting from rest, i.e. no kinetic energy) and see how long it takes for K.E. & P.E. to equilibrate, with and without collisions. Something like that would be a good pedagogical tool! -- Jess 09:45, 4 October 2008 (PDT)

In either case, it will be something that might prove still useful later on, and I can, nonetheless, build on it. I do not know if it has been done already.

The only hiccup is it may not seem 'ambitious' enough.

For this sort of project, the first step is to find a (physics-related) question and then try to imagine what the answer might look like and how to present it so that it illuminates the essence of the problem. By that time it will probably be obvious that there are trivial versions and too-hard versions and (maybe) versions that are "just right" for P210. -- Jess 09:45, 4 October 2008 (PDT)

Random "Music"

Musical compositions can have a complex architecture with sections dedicated to certain concepts. It allows for development, and the progression makes the music more enjoyable to listen to. What I wonder how a randomly generated composition will sound like, in comparison. The program will take in certain inputs, such as key, chords, time signature, and length, and create a melody of arbitrary chord progression and melody. Perhaps see how different algorithms create different flavours of music?

I would like to see it played with a randomly generated "instrument" as well. That is, an instrument with generated overtones of unknown relative amplitudes, and amplitude changes. Throwing in a random EQ along with a random timbre, if you will. Though that may be difficult because digital instrument models are very complex.

That sounds really interesting, but I don't know how to make it work. (I'm not saying it would be difficult; I just don't know how to make "randomized" music.) -- Jess 16:11, 6 October 2008 (PDT)

Other

PHYS 210 PROJECTS