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

Commit

Permalink
Version 18.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
KaleidonKep99 committed Jan 14, 2019
1 parent 53231f7 commit 05eae09
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 19 deletions.
184 changes: 181 additions & 3 deletions KeppyMIDIConverter/Bass.Net.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions KeppyMIDIConverter/Functions/BASSControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ public class MidiFilterProcAnalytic
}

public static Boolean[] TracksList;
public static Boolean MidiFilterProc(int handle, int track, BASS_MIDI_EVENT midievent, bool seeking, IntPtr user)
public static Boolean MidiFilterProc(int handle, int track, IntPtr midievent, bool seeking, IntPtr user)
{
try
{
Int32 Track = track;
BASS_MIDI_EVENT temp = midievent;
BASS_MIDI_EVENT temp = BASS_MIDI_EVENT.FromIntPtr(midievent);

if (temp.eventtype == BASSMIDIEvent.MIDI_EVENT_NOTE && (Properties.Settings.Default.IgnoreNotes1 || Properties.Settings.Default.AskForIgnoreTracks))
{
Expand Down
7 changes: 0 additions & 7 deletions KeppyMIDIConverter/Functions/BasicFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,6 @@ public static void ToAddOrNotToAdd(ListViewItem lvi, string notes, string str)
else
MainWindow.Delegate.Invoke((MethodInvoker)delegate { MainWindow.Delegate.MIDIList.Items.Add(lvi); });
}

public static void AddMIDIToListWithInfo(string MIDI)
{
string[] midiinfo = DataCheck.GetMoreInfoMIDI(MIDI);
ListViewItem lvi = new ListViewItem(new string[] { MIDI, midiinfo[2], midiinfo[1], midiinfo[0], midiinfo[3] });
ToAddOrNotToAdd(lvi, midiinfo[1], MIDI);
}
}

public static class StringExt
Expand Down
13 changes: 10 additions & 3 deletions KeppyMIDIConverter/Functions/Extensions/DataCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static string[] GetMoreInfoMIDI(string str)
}
catch { size = "-"; }

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

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

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

Bass.BASS_Free();
return new string[] { Length, Tracks.ToString("N0"), count.ToString("N0"), size, };
return new string[] {
Length,
String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", Tracks),
String.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", count),
size
};
}
catch
{
Expand Down
4 changes: 2 additions & 2 deletions KeppyMIDIConverter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("18.2.6")]
[assembly: AssemblyFileVersion("18.2.6")]
[assembly: AssemblyVersion("18.2.7")]
[assembly: AssemblyFileVersion("18.2.7")]
2 changes: 1 addition & 1 deletion KeppyMIDIConverter/kmcsetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define vc

#define MyAppSetupName "Keppy's MIDI Converter"
#define MyAppVersion '18.2.6'
#define MyAppVersion '18.2.7'

[Setup]
AllowCancelDuringInstall=False
Expand Down
2 changes: 1 addition & 1 deletion KeppyMIDIConverter/kmcupdate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.2.6
18.2.7

0 comments on commit 05eae09

Please sign in to comment.