GNMIDI

Table of Contents Keyword Index
Seek MIDI events by conditions (for experts)
Previous  Top  Next

[menu analyse]
dialog_findmidievents
Find MIDI events in current MIDI file matching optional channels 0-16 (0=no channel) and a C programming like condition expression. This operation requires some understanding of programming scripts in any language.

channels
Empty field means ignoring any MIDI event channel (same as 0-16).
Number 0 means events that have no MIDI channel (e.g. text, tempo ...).
Numbers 1-16 are MIDI channel numbers (e.g. notes, controllers, sound programs ...)
The field allows to enter a list of numbers between 0 and 16 and also number ranges (e.g. 1,3,5 11-16).
The separators can be spaces or comma.
Only events matching the numbers will be considered by the condition.
Even if a condition may also check channel numbers (e.g. ev.channel in [1,3,5,11..16]) using this field speeds up the duration



condition
This field expects a boolean expression in a C like script language.  
See more about MIDI event conditions written in gnscript syntax in page gnscript condition expressions syntax including examples.  


Search
Enter a condition and use button run to start the search.  

Syntax errors
errors are displayed in the box below the condition edit box (in English language).  

Results:
If searching is successful then number of matching events will be displayed in the box below the condition.  
 
OK
closes the dialog and generates an ASCII text file opened in GNMIDI which contains the matching events and some important events for correct MIDI timing (MIDI header, MIDI tempo events, MIDI tact events).  

Syntax help
will show this page (also F1 key). Use also gnscript package at https://www.gnmidi.com to learn from script examples.  

Too difficult
If programming is too difficult for you then we can also offer to program user tools for your special purpose that can be used directly in GNMIDI.  
It can analyse or modify or generate MIDI files.  
In fact we can use in most cases the gnscript language for implementation.