473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Help: How to create a midi file using C?

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
2 4185
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mad Scientist Jr | last post by:
any sample code or information would be most appreciated i have been wanting to learn MIDI programming but would rather learn it in my current language (either vb.net or c#)
11
by: Kuba Araszkiewicz | last post by:
Hello! I have to write a program, which would convert midi files to notes, notes to midi files and which would make one MIDI file from two different. I'm totally lame in C (and any other...
1
by: tim | last post by:
Someone using Python Midi Package from http://www.mxm.dk/products/public/ lately? I want to do the following : write some note events in a midi file then after doing that, put some controllers...
4
by: dbojan | last post by:
The rhythm giving midi file will be one track.Like midi drummer.And on the other midi file -the rhythm taker -we will place our notes regardless of their length (if they are chords no problem) and...
0
by: dbojan | last post by:
The rhythm giving midi file will be one track.And on the other midi file -the rhythm taker -we will place our notes regardless of their length (if they are chords no problem) and they will have the...
0
by: Sonicfreak17 | last post by:
OK... ive been EVERYWHERE online to find a way to do this: i want to be able to make .wav files with midi data- not so much premade midi files- but just sending on the fly midi notes and recording...
8
by: ravi | last post by:
Can anybody tell me you to play MIDI file through a C program ? i am using Turbo C++ Thanks.........
1
by: Mr.SpOOn | last post by:
Hi, I need to parse a midi file with Python. What I exactly need is the possibility to distinguish all notes in all channels in a midi file and put them in a list or something. I've found this:...
6
by: Massi | last post by:
Hi everyone, I'm searching for "something" which allows me to write scripts which handle midi files. I'm totally a newbie in audio manipulation, therefore any suggestion or link related to this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.