carlfoxmarten: (Default)
I haven't really been working on any of my programming projects for a while, mostly due to the amount of homework I've got right now.

However, this being Sunday, I have a little bit of time to work on other stuff.

So, I'm going to describe some of the things that my AniMidi project will require.
(maybe I'll get motivated and start working on it again...)

The end-goal that AniMidi has is to provide end-users (intended to be just above your average user) with virtual instruments to play your note-based music files.
(primarily MIDI files, though not limited to them)

This means that I have a fairly linear process for getting the music in one side and producing the (hopefully impressive) visuals out the other side:
  1. The user provides a music file in any supported format.
  2. The music file is scanned to determine which instruments are used.
  3. As the music file is scanned, a list of note-control messages are stored in a separate place, in such a way so as to make it really easy to control the instruments in real-time.
  4. As there may be more than one virtual instrument object that claims to match each instrument in the file, a decision must be made as to which ones to use. For instance, one virtual instrument may look more classical in nature and the other may look more futuristic, so the one that more closely matches the rest of the instruments should be chosen.
  5. Suggest a (fairly) random layout for the instruments based on the common type, including backgrounds.
  6. Allow the user to completely change everything if they want. (kind of like an "Advanced Layout" button)
  7. Play the music and virtual instruments together.
  8. Profit?

My primary concern is going to be in parsing the music files down to the individual note commands and making sure that the timing is always bang on.
I've been reading up on the MIDI file specification (as MIDI is also the name given to the wire-protocol used for digital instruments to talk to each other and has no timing information), and am still a little confused as to the timing part.

I've actually got a fairly thick book on the subject that I'm currently borrowing from the university library called "Beyond MIDI", and it goes into great detail on quite a number of note-based music representations, including Csound, Music Macro Language, and almost a dozen other formats and dialects.
(it's a good thing it's a four-month loan period, it's a tough slog!)

Once I figure out how to parse the music files down to an internal representation, it's a short step from there to the animation curves needed to control the instruments.

Well, fairly short, anyway.

If you've ever watched any of the Animusic videos, you'll have noticed that many instruments have common "striking" implements (ie, picks, hammers, drum sticks, etc.) that move around depending on which note they're supposed to hit.

All the work I've done so far has only had one "striker" per note, though I should eventually implement this common striker stuff as it really adds to the visual interest.
(plus, certain instruments really don't look right if each note has its own striker)

Anyway, the part I'm most concerned about is timing, as MIDI specifies more than one way to set it, and it can even be changed in the middle of a piece!
carlfoxmarten: (Default)
So, I've started thinking about my AniMidi project again, primarily about the MIDI import library.

Right now, I'm looking for a free, cross-platform library for reading MIDI files into an internal representation so I can grab the relevant music info at run-time.

So far, I've no ideas of what library to use, though I'm more interested in C++ based libraries at the moment.

For those of you who need a refresher on what my AniMidi project is, it's intended to be a free MIDI file visualization program that you give a MIDI file (or almost any other kind of note-based music file, though my first target is MIDI) and it will create virtual, 3D instruments that will appear to play the music as specified by the given file.

I was inspired by seeing Animusic's videos of virtual 3D rendered instruments playing music.
(you should still be able to find one or two of their clips on YouTube, for a quick preview)

How my project differs from Animusic's approach is that theirs is a commercial plugin to existing 3D tools (not sure which they use right now, last I checked I think it was 3D Studio Max) and is specifically intended to create rendered animations, while my AniMidi project is intended to be an interactive stand-alone program for end-users.
(as I'm planning on using C++, I'll be able to borrow a fair amount of code from my Tetris-Power project, so I won't have to rewrite too much code)

I'd started this project as a final project for a multimedia course I'd taken about a year ago, originally written in Java, but didn't have a good enough grasp of the MIDI import part, which left the rest of the project without much to go on.
My current attempt is to write it in C++, which I've had more experience in now, especially with 3D graphics with OpenGL and the SDL.
carlfoxmarten: (Default)
Recently I purchased a digital camera so I could take pictures wherever I am and get them onto my computer at a moments notice.
It's a Polaroid t737 with 7 megapixels and 3x analogue zoom.
(the most important features, you know)

Quality seems pretty good (though it's refurbished model, and is missing one screw from the side of the case), and the pictures are pretty sharp if you scale them down by about half.

I've taken a few pictures with it so far, so here are some flowers I found at my aunt's house:

A bee on some flowers:


Flowers:






I'll need to get a harder case for the camera than I have right now, as something seems to be rapidly pressing the power button, which seems to cause the lens cover to open and the lens to extend a bit.


I've been thinking about my Ani-Midi project again, and I've come to the conclusion that I need to rewrite it in C++ for performance reasons (Java just isn't fast enough).
Also, it needs to be a complete rewrite instead of just a port from Java to C++, as I hadn't focussed on the most important part of the software first (importing music).

Currently, I'm assuming I'll support the MIDI file format, as that's what I knew about first, but apparently that's not the only note-based music format.
According to Wikipedia, there are quite a number of note-based music formats, some of which are derivatives of the original Standard MIDI Format.
As I'll have my own internal music format, I'll just need to write import routines (and see if I can make a plugin system) so supporting a new format should be simpler.

I haven't quite decided how the instrument assemblies should be defined, as how I define it will determine if I can build the files by hand or have to write a script or program for it.
(I may just use an XML file and a bunch of Wavefront Object files, all zipped up to keep things small)

On the whole, the features I'm hoping to support will be something like this:
  • Support for MIDI music files (the more important format, but will probably include more formats later)
  • After reading the music file, it will offer the user options for where to put each instrument, and how each instrument is arranged.
  • The software will analyse how the instruments are played to figure out which instruments are played together to get an idea of sane defaults for where each instrument should go (instruments played together should be closer to each other)
  • The above-mentioned information will also be used to create some paths for the camera to follow during playback.
  • Scenery and props to make sure it doesn't look like a bunch of floating, moving stuff (appropriately positioned, of course)
  • Export of the settings used to create a video to some popular format so you can render it in an external rendering program for high-quality movies

I'm sure I have more features to list around here somewhere, but I've stopped loading Tomboy Notes on startup due to its insistence for showing its main window right after launch...
carlfoxmarten: (Default)
I thought it would be interesting (for all of us) if I listed most of the projects I'm currently working on.
All are in various stages of completion, and most are programming projects, though some are computer artwork.

So here is a list in no particular order of projects I'm currently working on:
  • Tetris v1.1:
    This is a simple rewrite of some of the graphics and window code for my original Tetris game. It has a higher priority than Tetris Power, due to being rewritten in SDL and needing a font engine.
  • Tetris Power (otherwise known as Tetris v2.0):
    A complete, from-scratch Tetris-clone using SDL for cross-platform capabilities that will have a large number of powerups. Updates as they happen, only on Carl's LJ!
  • Networked action game: (name available upon request)
    I'm currently in the process of rewriting an ex-course project (and, it seems, without most of the members who worked with me on it), so I'm rewriting certain things in grand style to ensure that it's as flexible and efficient as possible. So far I've started to rewrite the network message system, which has broken almost all other modules (at least, until I finish that part and go on to actually use it elsewhere). I'll also be completely rewriting the display code to decouple it from the game engine (which may also get an overhaul) and so I can use any of a number of front-ends (currently slated to include 2D and 3D variants).
  • Ani-Midi:
    No, I haven't forgotten about this project, and I will be working on this again, though now I'm not sure when I'll get back to it, as I have quite a number of projects on the go already and don't have the interest for it again (not to say that it won't ever be done, it's just that all these projects seem to have a timeshare agreement on my brain, and it's not this guy's turn yet). Several things I need to do with this is completely rethink the way this needs to designed. When I first wrote this, there was two ends of a chain to work on, the MIDI side and the graphics side, and I started at each end (though primarily focusing on the graphics end) and tried to work my way towards the middle, which led to a rather large problem when I actually got there. Next time I need to start at the MIDI side and work my way in the direction of the graphics end, keeping in mind how I had managed it last time so I have some idea of what's needed there.
  • Space Tree:
    This is a piece of artwork I'm currently designing, as usual, in Blender. It's primarily a pressurized garden dome for rest and relaxation in space, with the centrepiece being a large tree. A spiral staircase will lead down from the dome to a separate area, which I don't currently plan to think about. The rest of the area will contain flowers, bushes, benches, etc. Aside from this, I don't know much more about it, aside from the fact that it looks cool in my head...
  • Magpie House Redesign:
    Last but certainly not least is redesigning Kathy's entire website to streamline it (amongst other things). It has come to my attention that people would really like a story arc page (and/or an archive page), so I would like to create one for her that would take a minimal amount of time on her part, which means I need to figure out what it should look like. I've already received one or two ideas from Marmoe, so I was wondering if anybody else would be interested in coming up with another one. Any takers? You can send me a message here on LJ or send it to me via e-mail by the following e-mail address: "c fox marten AT inbox DOT com"

    Not the largest number of projects I've worked on at once, but there it is.


    Incidentally, I found an old DOS game that is kind of similar to what I'm working on, but without gravity.

    It's called Squarez, and it's written by the same people who wrote the similarly-old Jetpack DOS game.
    (both are available from Adept Software in a single zip file)

    The initial key setup is a little awkward for me as I'm used to the drop and rotate keys being in the other order, but you get used to that after a while.

    I might be inspired by some powerups from it as I write Tetris-Power, in case I miss anything, but not much...


    In addition to all of the above, I'm currently taking two math courses (probably a bad idea, but they're on rather different topics, so it's probably not that bad an idea).
    One is an introductory statistics course that I should have taken a while ago and the other is Calculus level 2 (otherwise known as Integral Calculus), which I am taking again after failed it the first time round (I blame the instructor. My current instructor is one I've taken several math courses with already, so I know him a little better).

    So I'm currently on campus five days a week, alternating between the statistics class on Monday, Wednesday and Friday, and the Calculus course Tuesdays and Thursdays.


    Also, to top off that again, I might be delivering a second route on top of the one I'm running already, which would make this the second time that I deliver two routes at once (you know what I mean!).

    As far as I'm concerned, I've delivered newspapers to three different routes in my area in the years I've been delivering papers.
    Also, as far as the newspaper is concerned, I've delivered three different routes as well (and yes, they are the same).

    The difference between the above is that, before I was the one whose name was on the route, my brother's name was on the route, and we delivered papers together.
    After a time, my brother got a "real" job at a warehouse, transferring the route to my name and leaving me to continue delivering.

    I must say that, while it's not easy to do all the time, it's become difficult for me to do a poor job at it.
    (that's a good thing, right?)

    When I started delivering newspapers again after taking a "vacation" off, I actually impressed several people due to the deep snow I waded through to make sure people got the paper.
    (it's a free local newspaper, so it's not quite as imperative that it get delivered properly, but I just can't quite let myself not do it, so I do it anyway)

    I'm still looking for another sled to help carry the papers on really snowy days (which might only get used about three times a year on average, but could be used for hill sledding on off days), the places I'd usually look haven't had anything that could be used for these purposes at all...
carlfoxmarten: (Default)
Drat it.

The AniMidi project was due today, but for all my efforts, it did not work as billed.

The TA would have given me an entire day extra to get it working, but I declined as I'm really not convinced that I could fix it with just 24 hours more.

I think I need to rip the entire project apart and start over, using only what worked and discarding the rest, to be only used for reference.
(truthfully, this is what "they" recommend in the first place, version one usually has huge bugs and oversights that necessitate an entire rewrite, so instead of trying to patch it, just rewriting it from scratch would save time. I'm starting to believe them)

In its current form, it can read in my instrument shapes and descriptions and display them on screen, and can read the MIDI files for the note data, but there are three problems between them: I don't understand MIDI note timing (the standard is rather unhelpful), the keyframe animation engine is in need of some serious redesigning (I made it way too general that I lost sight of what it's supposed to do...), and general over- and under-sights all the way through (some things I did a good job of designing, like the Position and Rotation classes, but much of the rest did not get thought out very thoroughly, leaving many gaping holes and a big pile of a mess).

Ah well, another assignment has higher priority right now, a raytracer written from scratch.
Mostly done, too.

For that one, I started out with the basic building blocks (Points, Colours, Images - in both PPM and PGM formats - as well as Triangles, Spheres, Materials, Lights - in ambient, parallel and point variants - etc.) and this time I managed to get everything working just fine, the only thing I have left to do is add is proper shading with the lights, then two of the eight add-ons (such as bump mapping, displacement mapping, light and chrome mapping, etc).

Fortunately, since I'm mostly done and not due until Sunday night, I don't have to spend nights working on it, so I can catch up on some much-needed sleep...




In other news, to get my mind off all the work I've been doing, I made some cornmeal biscuits to go with dinner.
(hey, anything aside from coursework is newsworthy, right?)

They turned out pretty nicely, though I almost think I folded them over into themselves a couple too many times, making them a little firmer than they should otherwise be, but hey, I haven't made them in months, so I've probably lost some of my touch.

And I must say that I've been enjoying them... =^.^=

Profile

carlfoxmarten: (Default)
Carl Foxmarten

August 2017

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
272829 3031  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 21st, 2017 06:50 am
Powered by Dreamwidth Studios