Skip to contentSkip to conversation

note on /off at same time

DISCUSSION Cesar Hernandez 2 participants 2 messages Jul 26, 2005 – Jul 27, 2005

lore
Share & tools
lore
#0 lore raw

Hi.
I have some questions about sending noteon and noteoff events. -If I first send a noteon and then a noteoff to the same channel, note, and timetick, what happens? Will the note play? I've been playing with this and I can't hear anything... but using aseqview it seems to play a very short note. If I send first the noteoff and then noteon, what happens?

-If I send two noteon with the same timetick, channel and note, will it play only one note? And then, must I send two noteoff to stop them ? Or it's only needed one noteon?

Thanks

Signature · 16 lines
Cesar Hernandez
[email protected]
Genos Open Source S.L.
Tarragona, 100. 08015 Barcelona
Tel. 932 282 231

http://genos.es
http://www.genos.org



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
#1 lore raw
Quoted 2 lines · Cesar Hernandez

-If I first send a noteon and then a noteoff to the same channel, note, and timetick, what happens?

The ALSA sequencer doesn't reorder events, even those with the same timestamp, so both events will be delivered in that order to the synthesizer.

What happens then depends on the synthesizer, but on most devices, the note off will shut off the earlier note on. Some devices can be configured to ignore all note off events (regardless of their time relative to the note on), and some do this by default for notes on the drum channel.

Quoted 1 line

If I send first the noteoff and then noteon, what happens?

The note off will be ignored. The note on will start a note.

Quoted 2 lines

-If I send two noteon with the same timetick, channel and note, will it play only one note? And then, must I send two noteoff to stop them ?

It doesn't matter that the events are sent at the same time, the synthesizer will handle them one ofter the other.

The handling of duplicate notes depends on the synthesizer. GS and XG devices can be configured to kill earlier notes with the same note number, or to play both notes. However, with most devices, a note off will shut off all notes with the same note number.

HTH
Clemens

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click