Auth. password: BYONIPASS1234



library MIDILib functions:


' check whether the parameter pwd is valid password (BYONIPASS1234)
function CheckPassword (ByVal pwd As String) As Boolean


' convert MIDI file to SMAF file (supports only SMF0 input files)
' exit codes: 0,1,2
function MIDI2SMAF (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword as String) As Byte


' return the length of MIDI file in mS
' exit codes: 0,1
function MIDIGetLengthMs (ByVal InFileName As String, ByVal AuthPassword As String, ByRef msLength As Long) As Byte


' trim MIDI file with measure in milliseconds
' exit codes: 0,1,2,3
function MIDITrimMs (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword as String, ByVal msBegin As Long, ByVal msEnd As Long) As Byte


' trim MIDI file with measure in percents of its total time
' exit codes: 0,1,2,3
function MIDITrimPercents (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword as String, ByVal BeginPercent As Byte, ByVal EndPercent As Byte) As Byte


' return maximal volume, average volume and average pitch of MIDI file
' exit codes: 0,1,2
function MIDIGetVol (ByVal InFileName As String, ByVal AuthPassword As String, ByRef MaxVol, ByRef AvgVol, ByRef AvgPitch As Byte) As Byte


' increase/decrease volume and/or pitch of MIDI file. IncDrums show whether will change the drums or not
' exit codes: 0,1,2
function MIDISetVol (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, ByVal IncVol As Integer, ByVal IncPitch As Integer, IncDrums As Boolean) As Byte


' set absolute volumes for 8 frequency bands. bn1..bn8 are the absolute values for the volumes [0..127] for every band, bdrums is the volume for drums
' exit codes: 0,1,2
function MIDIEqualizer (ByVal InFileName As String, ByVal OutFileNameAs String, ByVal AuthPassword As String, 
			ByVal bn1 As Byte, ByVal bn2 As Byte, ByVal bn3 As Byte, ByVal bn4 As Byte, 
			ByVal bn5 As Byte, ByVal bn6 As Byte, ByVal bn7 As Byte, ByVal bn8 As Byte, ByVal bdrums As Byte) As Byte


' set instrument map. InstrMap is a byte array with 256 elements [0..255]. 0..127 are the instruments; 128..255 are drums. If the instrument is a drum then 128 is added to its code and this number is an index in InstrMap
' exit codes: 0,1,2
function MIDISetInstrMap (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, OldMap As InstrMap, NewMap As InstrMap) As Byte


' combine two MIDI files and put the second one after the fisrt
' exit codes: 0,1,2
function MIDICombine (ByVal InFileName1 As String, ByVal InFileName2 As String, ByVal OutFileName As String, ByVal AuthPassword As String) As Byte


' merge two MIDI files and make them to play simultaneously
' exit codes: 0,1,2
function MIDIMerge (ByVal InFileName1 As String, ByVal InFileName2 As String, ByVal OutFileName As String, ByVal AuthPassword As String) As Byte


' convert MIDI to SP-MIDI
' exit codes: 0,1,2,4
' ChannelsPriority is 16 (or less) characters string with HEX represents the number of every channel: channel 1 - 0; channel 2 - 1; ..... channel 16 - F
' ReorderDrums is a flag whether channels 9 and 15 (drum channels) should be reordered as all others or not
' ChMaxPoly - how many notes can play simultaneously in a single channel
function MIDI2SP (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, ByVal ChannelsPriority As String, ByVal ReorderDrums As Boolean, ChMaxPoly As Byte) As Byte


' return a text file containing 16-characters string "Channels" with the used channels ("1" as every position if the channel is used, otherwise "0"); the first character is for channel 0, second - channel 1, etc...
' exit codes: 0,1,2
function MIDIUsedChannels (ByVal InFileName As String, ByVal ResultFile As String, ByVal AuthPassword As String) As Byte


' copy MIDI channel (0..15) to other MIDI channel (0..15)
' exit codes: 0,1,2
function MIDICopyChannel (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, ChannelFrom As Byte, ChannelTo As Byte) As Byte


' remove MIDI channel (0..15)
' exit codes: 0,1,2
function MIDIRemoveChannel (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, Channel As Byte) As Byte


' return a text file with some MIDI tags
' every line of file TagsOutFileName has the following structure:
'	code text (no space between them)
' valid tag ASCII codes are:
'	#1: text
'	#2: copyrights
'	#3: track/song name
'	#4: instrument name
'	#5: lyrics
' exit codes: 0,1,2
function MIDIGetTags (ByVal InFileName As String, ByVal TagsOutFileName As String, ByVal AuthPassword As String) As Byte


' set MIDI tags from a text file
' the file TagsInFileName has the same structure. If there are more than one tags with equal ' numbers, every next one is put into its respective track into the MIDI file
' exit codes: 0,1,2
function MIDISetTags (ByVal InFileName As String, ByVal TagsInFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String) As Byte


' return the time [mS] of the first playing note
' exit codes: 0,1,2
function MIDIFirstNoteTimeMs (ByVal InFileName As String, ByVal AuthPassword As String, ByRef Time As Integer) As Byte


' make a dump of MIDI file
' when Verbose mode is "false" output line format is: <Channel>,<Note [Key]>,<Velocity>,<Start Time>,<Stop Time>,<Instrument [Bank]>
' exit codes: 0,1,2
function MIDIDump (ByVal InFileName As String, ByVal OutFileName As String, ByVal AuthPassword As String, Verbose As Boolean) As Byte




Exit codes:

0 - ok
1 - invalid password
2 - missing input file
3 - invalid timescale
4 - bad channels priority string
