Re: midi- note on/off
From: Monica (leungmonica_at_yahoo.com)
Date: 09/28/04
- Next message: Jani Yusef: "Re: calculating an exponent?"
- Previous message: Tim ffitch: "VB6 Common Code for Access, Excel and VB Projects"
- Maybe in reply to: Monica: "midi- note on/off"
- Next in thread: Programmer Dude: "Re: midi- note on/off"
- Reply: Programmer Dude: "Re: midi- note on/off"
- Reply: Malcolm Dew-Jones: "Re: midi- note on/off"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 23:10:58 +0800
You've mentioned this...
> If you are playing midi, then various standards such as midi file
> format contain the length of each note, and software that can read and
> play from that format will do what ever they do to make it work.
I am actually writing a S/W, which read the midi binary file.. and then
convert it to my embedded system's codec format.
that's
Playnote(frequency, amplitude, duration){}
That means I need the duration of each note specifically. Would you
please say specifically how I can calculate the duration?
Thank you!
-Monica
Malcolm Dew-Jones wrote:
> Monica (leungmonica@yahoo.com) wrote:
> : Do anyone know about the midi protocol?
>
> : I would like to know specifically how long each note is pressed?
>
> That is not part of the midi protocol. If recording, you must measure the
> time when you receive a note on event and the time when you receive a note
> off event, and compare the two times. How to do that depends on what
> platform you are using. You don't actually have to measure the timing of
> individual notes, if you simply record the time between events then you
> can play back the original stream of events with the correct time between
> the events and the length of each note will work automatically.
>
> If you are playing midi, then various standards such as midi file format
> contain the length of each note, and software that can read and play from
> that format will do what ever they do to make it work. In that case you
> must simply format a file correctly to get the output you want.
>
> If you are playing midi event for event in your own software then you must
> figure out a way to do this yourself, though it might be easy enough if
> you are using a set of library routines cause they will provide functions
> that takes care of those details.
>
>
> : say if i receive a note on message.... then a note-off message is
> : obtained.[then how long is the note pressed?]
> : how can I calculate it?
> : Thank you!
- Next message: Jani Yusef: "Re: calculating an exponent?"
- Previous message: Tim ffitch: "VB6 Common Code for Access, Excel and VB Projects"
- Maybe in reply to: Monica: "midi- note on/off"
- Next in thread: Programmer Dude: "Re: midi- note on/off"
- Reply: Programmer Dude: "Re: midi- note on/off"
- Reply: Malcolm Dew-Jones: "Re: midi- note on/off"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|