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" colet.patrice@free.fr À: "Rory Walsh" rorywalsh@ear.ie Cc: "pd-list" pd-list@iem.at 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" rorywalsh@ear.ie À: "colet patrice" colet.patrice@free.fr 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" potaxpotax@gmail.com À: "pd-list" pd-list@iem.at 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!
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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, colet.patrice@free.fr 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" colet.patrice@free.fr À: "Rory Walsh" rorywalsh@ear.ie Cc: "pd-list" pd-list@iem.at 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" rorywalsh@ear.ie À: "colet patrice" colet.patrice@free.fr 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" potaxpotax@gmail.com À: "pd-list" pd-list@iem.at 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!
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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, colet.patrice@free.fr 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" colet.patrice@free.fr À: "Rory Walsh" rorywalsh@ear.ie Cc: "pd-list" pd-list@iem.at 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" rorywalsh@ear.ie À: "colet patrice" colet.patrice@free.fr 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" potaxpotax@gmail.com À: "pd-list" pd-list@iem.at 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!
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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.
[midifile] outputs lists made up of midi messages, the first item in the list is always a status byte, a number between 128 and 255. So something like:
[midifile] | [route 144] | [noteout]
will route note-ons on channel 1 to the midi output device, because the status byte for note on is 144.
[midifile] | [route 144] | [unpack 0 0] | |
will give you the note number and velocity. This works if the file is a single track. For multi-track you might also want to select a track with the [track n( message. Usually the duration of a note is determined when the note-off message is sent. There is a status 128 for note-off but usually note-on with velocity 0 is used instead.
If there are controllers in the file you can add a [route 176] and send them to [ctlout].
Martin