473,387 Members | 1,483 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,387 software developers and data experts.

parse a midi file

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:

http://groups.google.com/group/alt.s...467419ad4bf416

I'm not sure how it does work, but looking at the code I saw it can
get input from the terminal, so I tried:

python midi.py < mymidi.mid

All it does is printing a lot of strange symbols.

Do you know other easy way to parse a midi file in Python? Or how
actually does this module work?

Thanks,
Carlo
Sep 16 '08 #1
1 6546
On Sep 16, 9:48*pm, Mr.SpOOn <mr.spoo...@gmail.comwrote:
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:

http://groups.google.com/group/alt.s...467419ad4bf416

I'm not sure how it does work, but looking at the code I saw it can
get input from the terminal, so I tried:

python midi.py < mymidi.mid

All it does is printing a lot of strange symbols.

Do you know other easy way to parse a midi file in Python? Or how
actually does this module work?

Thanks,
Carlo
hi, just looked at the code. try this

python midi.py -i mymidi.mid

to see all the debug information do
python midi.py -p -d -i mymidi.mid
Sep 16 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Max M | last post by:
If anybody is interrested in Midi, but are not on the Python Midi list, I will just notify that I have released the first version of a high level midi package for Python. It is fully functional....
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...
2
by: david | last post by:
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...
0
by: tom | last post by:
Hallo, I need help on MIDI file, and precisely about retrieving few note values (mainly the "Velocity" value, corrisponding to the intensity of a played note) while the MIDI is playing.
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: sreekant | last post by:
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I...
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...
6
by: Gilly | last post by:
Hi I am trying to create an application that uses some form of input to create a midi file. I would like for this to be a 'real time' process. In other words, I want to be able to begin playing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.