Help: How to create a midi file using C?

D

david

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.
 
J

Joe Wright

david said:
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'.
 
S

Simon Biber

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.

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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top