Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69377 Topics- by 58433 Members - Latest Member: graysonsolis

April 29, 2024, 02:28:32 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)About midi and music
Pages: [1]
Print
Author Topic: About midi and music  (Read 1785 times)
cmspice
Level 1
*


View Profile
« on: March 26, 2009, 05:26:22 PM »

So It's like spring break and stuff. I'm trying to learn some new languages (though I find myself doing everything in java again) and make myself a keyboard simulator (like guitar hero style, or really more like keyboard mania http://en.wikipedia.org/wiki/Keyboardmania). There's already one out there called doremi that's rather poorly done and rather Japanese. It uses .pms files and offers a midi to pms converter.

In any case, I'm wondering if midi files are appropriate to convert directly into rhythm game data? I was hoping using midi files would easily give me a huge depository of songs to play.  But even the simplest song I've looked up so far have been horribly complicated and span a huge range of pitches (I assumed a change of one in pitch  in the midi files corresponds to one note on the C scale). Moreover, I haven't the faintest idea which pitch corresponds to what note on what scale.

Anyone have any thoughts about this?
« Last Edit: March 31, 2009, 04:42:21 PM by Derek » Logged
David Pittman
Level 2
**


MAEK GAEM


View Profile WWW
« Reply #1 on: March 26, 2009, 07:07:44 PM »

I messed around with MIDI files a couple of years back with the goal of eventually writing a procedural music generator. It never materialized, but I enjoyed learning about the format.

You'd probably want to store some additional metadata about any given MIDI song, like which channel represents the main melody that the player would be performing; but other than that, I don't see why the format wouldn't suffice for your purposes.

The range of notes is 0-127, where 60 (or 0x3C) is defined as middle C. As you correctly surmised, each increment is a semitone or half-step, so 61 is C# above middle C. (Make sure you're not looking at pitch bend events, where the range is 0-16383 and maps to a variable range depending on the instrument, usually +/- 2 semitones.)
« Last Edit: March 26, 2009, 07:12:20 PM by David Pittman » Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #2 on: March 26, 2009, 09:53:53 PM »

"Moreover, I haven't the faintest idea which pitch corresponds to what note on what scale. "

The interesting thing about the scales is that they aren't linear, but kind of logarithmic. Here's a chart: http://en.wikipedia.org/wiki/File:Music_frequency_diatonic_scale-3.svg
Logged

ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #3 on: March 26, 2009, 09:57:41 PM »

You may also want to look into the freeware program formerly known as Piano Hero, currently known as Synthesia.
Logged

cmspice
Level 1
*


View Profile
« Reply #4 on: March 26, 2009, 10:20:04 PM »

Hey thanks. That helps.

I was not aware of Synthesia. Oh well, I shouldn't let that discourage me. It's really (another) learning project anyways.
Logged
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #5 on: March 27, 2009, 06:37:14 PM »

Midi sounds like crap. If you wanna go that route, go with modules instead.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic