Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit 05eae09

Browse files
committed
Version 18.2.7
1 parent 53231f7 commit 05eae09

7 files changed

Lines changed: 197 additions & 19 deletions

File tree

KeppyMIDIConverter/Bass.Net.xml

Lines changed: 181 additions & 3 deletions
Large diffs are not rendered by default.

KeppyMIDIConverter/Functions/BASSControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@ public class MidiFilterProcAnalytic
327327
}
328328

329329
public static Boolean[] TracksList;
330-
public static Boolean MidiFilterProc(int handle, int track, BASS_MIDI_EVENT midievent, bool seeking, IntPtr user)
330+
public static Boolean MidiFilterProc(int handle, int track, IntPtr midievent, bool seeking, IntPtr user)
331331
{
332332
try
333333
{
334334
Int32 Track = track;
335-
BASS_MIDI_EVENT temp = midievent;
335+
BASS_MIDI_EVENT temp = BASS_MIDI_EVENT.FromIntPtr(midievent);
336336

337337
if (temp.eventtype == BASSMIDIEvent.MIDI_EVENT_NOTE && (Properties.Settings.Default.IgnoreNotes1 || Properties.Settings.Default.AskForIgnoreTracks))
338338
{

KeppyMIDIConverter/Functions/BasicFunctions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,6 @@ public static void ToAddOrNotToAdd(ListViewItem lvi, string notes, string str)
227227
else
228228
MainWindow.Delegate.Invoke((MethodInvoker)delegate { MainWindow.Delegate.MIDIList.Items.Add(lvi); });
229229
}
230-
231-
public static void AddMIDIToListWithInfo(string MIDI)
232-
{
233-
string[] midiinfo = DataCheck.GetMoreInfoMIDI(MIDI);
234-
ListViewItem lvi = new ListViewItem(new string[] { MIDI, midiinfo[2], midiinfo[1], midiinfo[0], midiinfo[3] });
235-
ToAddOrNotToAdd(lvi, midiinfo[1], MIDI);
236-
}
237230
}
238231

239232
public static class StringExt

KeppyMIDIConverter/Functions/Extensions/DataCheck.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static string[] GetMoreInfoMIDI(string str)
4545
}
4646
catch { size = "-"; }
4747

48-
Bass.BASS_Init(0, 22050, BASSInit.BASS_DEVICE_NOSPEAKER, IntPtr.Zero);
48+
Bass.BASS_Init(0, 4000, BASSInit.BASS_DEVICE_NOSPEAKER, IntPtr.Zero);
4949
Int32 time = BassMidi.BASS_MIDI_StreamCreateFile(str, 0L, 0L, BASSFlag.BASS_STREAM_DECODE, 0);
5050

5151
if (time == 0) return null;
@@ -57,11 +57,18 @@ public static string[] GetMoreInfoMIDI(string str)
5757
// Get length of MIDI
5858
string Length = span.Minutes.ToString() + ":" + span.Seconds.ToString().PadLeft(2, '0') + "." + span.Milliseconds.ToString().PadLeft(3, '0');
5959

60-
UInt64 count = (UInt64)BassMidi.BASS_MIDI_StreamGetEvents(time, -1, BASSMIDIEvent.MIDI_EVENT_NOTES, null);
60+
UInt64 count = 0;
6161
Int32 Tracks = BassMidi.BASS_MIDI_StreamGetTrackCount(time);
62+
for (int i = 0; i < Tracks; i++)
63+
count += (UInt32)BassMidi.BASS_MIDI_StreamGetEvents(time, i, BASSMIDIEvent.MIDI_EVENT_NOTES, null);
6264

6365
Bass.BASS_Free();
64-
return new string[] { Length, Tracks.ToString("N0"), count.ToString("N0"), size, };
66+
return new string[] {
67+
Length,
68+
String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", Tracks),
69+
String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", count),
70+
size
71+
};
6572
}
6673
catch
6774
{

KeppyMIDIConverter/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
3333
// usando l'asterisco '*' come illustrato di seguito:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("18.2.6")]
36-
[assembly: AssemblyFileVersion("18.2.6")]
35+
[assembly: AssemblyVersion("18.2.7")]
36+
[assembly: AssemblyFileVersion("18.2.7")]

KeppyMIDIConverter/kmcsetup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define vc
66

77
#define MyAppSetupName "Keppy's MIDI Converter"
8-
#define MyAppVersion '18.2.6'
8+
#define MyAppVersion '18.2.7'
99

1010
[Setup]
1111
AllowCancelDuringInstall=False

KeppyMIDIConverter/kmcupdate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.2.6
1+
18.2.7

0 commit comments

Comments
 (0)