I'm no expert either, but from what I understood, Patko meant to say,
that a midi-file is organized in a way, that note-on and note-off
messages are separate events, of which each has its own time stamp.
Translated into human-readable instructions, a midifile says 'press key
C# now'. And a few moments later it says 'release key C# now'. Those are
two separate events. There is no event containing the length of the
played note in the midi universe. If you're interested in the length of
a note, you need to measure the time between the note-on and the
note-off message for a certain note. 

For playing a synth you usually don't need the length information at
all. You just send it the note-on and note-off messages at appropriate
times. I haven't tried [mrpeach/midifile] myself, but from the help file
I take, that you need to send it 'bang' messages in regular time periods
in order to make it spit out midi messages. In the help file you simply
click the 'play' toggle, which will turn on the metro, which then sends
the 'bang' messages.

Roman



On Thu, 2010-04-22 at 15:35 +0200, PF wrote:
> i'm no expert in midi, but i want to send midi notes (and durations)
> from a .mid file to a synth of mine.
> i see the midifile help has a bunch of stuff for noteOn and noteOff
> events, but it's confusing to me. if anyone can clarify a bit i'd
> really appreciate that.
> 
> 
> 
> On Thu, Apr 22, 2010 at 12:50 PM,  <[email protected]> wrote:
> >  Maybe you mean by delta, finding an algorithm that is able to add delta 
> > values between note On and note Off messages?
> >
> > http://253.ccarh.org/handout/vlv/
> >
> >
> > ----- Mail Original -----
> > De: "colet patrice" <[email protected]>
> > À: "Rory Walsh" <[email protected]>
> > Cc: "pd-list" <[email protected]>
> > Envoyé: Jeudi 22 Avril 2010 12h08:31 GMT +01:00 Amsterdam / Berlin / Berne 
> > / Rome / Stockholm / Vienne
> > Objet: Re: [PD] length in midifile
> >
> >
> > It's not me that has decided there is no midi note length, it's the midi 
> > protocol creators.
> >
> >  you have Note On for playing the note, and Note Off to stop playing the 
> > note, how would it be better?
> >
> > for this reason we often use [stripnote] because [makenote] sends a Note On 
> > and a Note Off (the same note with velocity zero)
> >
> > that's also why there is an object like [poly] that can redistribute those 
> > On and Off notes.
> >
> >  Just read about midi protocol!
> >
> > ----- Mail Original -----
> > De: "Rory Walsh" <[email protected]>
> > À: "colet patrice" <[email protected]>
> > Envoyé: Mercredi 21 Avril 2010 19h56:56 GMT +01:00 Amsterdam / Berlin / 
> > Berne / Rome / Stockholm / Vienne
> > Objet: Re: [PD] length in midifile
> >
> >> there is no midi length message, only midi noteOn for begining and midi 
> >> noteOff message for ending
> >
> > Of course there is. Unfortunately I'm not familiar with the [midifile]
> > object, so I've know idea how to retrieve delta-time values with it. I
> > just felt compelled to write back and confirm that midi files do of
> > course contain timing information, how else would sequencers know when
> > to play the notes?
> >
> > Rory.
> >
> >
> >>
> >> ----- Mail Original -----
> >> De: "PF" <[email protected]>
> >> À: "pd-list" <[email protected]>
> >> Envoyé: Mercredi 21 Avril 2010 17h31:09 GMT +01:00 Amsterdam / Berlin / 
> >> Berne / Rome / Stockholm / Vienne
> >> Objet: [PD]  length in midifile
> >>
> >> hi
> >> how do i get note length information from [midifile]?
> >> i can't see it in the help file.
> >> thanks!
> >>
> >> _______________________________________________
> >> [email protected] mailing list
> >> UNSUBSCRIBE and account-management -> 
> >> http://lists.puredata.info/listinfo/pd-list
> >>
> >> _______________________________________________
> >> [email protected] mailing list
> >> UNSUBSCRIBE and account-management -> 
> >> http://lists.puredata.info/listinfo/pd-list
> >>
> >
> > _______________________________________________
> > [email protected] mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> >
> > _______________________________________________
> > [email protected] mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> >
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to