By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,208 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,208 IT Pros & Developers. It's quick & easy.

Help: How to create a midi file using C?

P: n/a
1.I am considering doing a midi file generator for my
4th year project in B.SC.
2.I would do it using c language, but i'm not sure abou t the
level of difficulyt involved
3.Basically, the executable c program would read a text document
with some "musical pseudocode" representing some `tune`.
Then convert the "musical pseudocode" into "midi code" that
could be played in any midi player like `windows media player`.
4.How would you do this?
5.I hear that you could use `truncated fourier series`; but how to
do this?
6.Also, how to re-create various musial instruments?
7.Please give me some quick guidence on the above issues.
8.Thanks.

Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
david wrote:
1.I am considering doing a midi file generator for my
4th year project in B.SC.
2.I would do it using c language, but i'm not sure abou t the
level of difficulyt involved
3.Basically, the executable c program would read a text document
with some "musical pseudocode" representing some `tune`.
Then convert the "musical pseudocode" into "midi code" that
could be played in any midi player like `windows media player`.
4.How would you do this?
5.I hear that you could use `truncated fourier series`; but how to
do this?
6.Also, how to re-create various musial instruments?
7.Please give me some quick guidence on the above issues.
8.Thanks.


I'm not familiar with Irish schools enough to know what 4th year means
and what B.SC means. Also this is a C language group and we don't know
from 'midi'.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 15 '05 #2

P: n/a
Joe Wright wrote:
david wrote:
1.I am considering doing a midi file generator for my
4th year project in B.SC.
2.I would do it using c language, but i'm not sure abou t the
level of difficulyt involved
3.Basically, the executable c program would read a text document
with some "musical pseudocode" representing some `tune`.
Then convert the "musical pseudocode" into "midi code" that
could be played in any midi player like `windows media player`.
4.How would you do this?
Read up on the MIDI file format.
http://www.google.com/search?q=midi+file+format

Choose what instruments you want, and convert your tune representation
into 'note on' and 'note off' messages in the file you output.
5.I hear that you could use `truncated fourier series`; but how to
do this?
Fourier series are used for translating between time domain and
frequency domain. There is no such translation necessary when outputting
a MIDI file, as the note values are entered directly as an integer value
in semitones.
6.Also, how to re-create various musial instruments?

Just include 'program change' messages at the appropriate point in the
MIDI file. The MIDI player (software or hardware) takes care of actually
re-creating the specified instruments.
I'm not familiar with Irish schools enough to know what 4th year means
and what B.SC means. Also this is a C language group and we don't know
from 'midi'.


B.Sc stands for Bachelor of Science. The OP is in the 4th year (probably
the last year) of an undergraduate university degree.

--
Simon.
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.