AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Projekte TMIDIPlayerComp
Thema durchsuchen
Ansicht
Themen-Optionen

TMIDIPlayerComp

Ein Thema von EWeiss · begonnen am 6. Jun 2011 · letzter Beitrag vom 5. Feb 2016
Antwort Antwort
EWeiss
(Gast)

n/a Beiträge
 
#1

AW: TMIDIPlayer2

  Alt 28. Mai 2012, 19:31
hat sich erst mal erledigt

Geändert von EWeiss (30. Mai 2012 um 12:59 Uhr)
  Mit Zitat antworten Zitat
beanbear6

Registriert seit: 28. Okt 2009
Ort: Passau
170 Beiträge
 
Delphi 7 Enterprise
 
#2

AW: TMIDIPlayer2

  Alt 29. Mai 2012, 04:58
Hi EWeiss,
das sieht ja cool aus!! Jetzt geht auch die Lyrics
einwandfrei.
Ich hab da nen Sonderfall mit diesen Kompos:
Kann ich da auch Lyrics eines externen Hardware-
Midifile-Players importieren und anzeigen lassen?
Gruß beanbear
Reiner
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#3

AW: TMIDIPlayer2

  Alt 29. Mai 2012, 08:31
Zitat:
Kann ich da auch Lyrics eines externen Hardware-
Midifile-Players importieren und anzeigen lassen?
Die frage ist was du darunter verstehst.
Ich habe eine externe 250Gb große Festplatte (USB) warum sollte ein MidiFile das ich dort ablege nicht funktionieren
vorrausgesetzt das Midifile enthält Lyrics

Lade mal ein MidiFile von dem Player hoch.

gruss

Geändert von EWeiss (29. Mai 2012 um 09:42 Uhr)
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#4

AW: TMIDIPlayer2

  Alt 3. Jun 2012, 07:18
Neue Version oben siehe change log

gruss
  Mit Zitat antworten Zitat
midijorss

Registriert seit: 3. Feb 2010
7 Beiträge
 
#5

AW: TMIDIPlayer2

  Alt 24. Jun 2012, 11:20
Hello Emil,

Thanks again to you and Silhwan Hyun for your great effort for TMIDIPlayer2 project
I've tried to play the standard midifile many times than found a solution.

I've added two variations after implemetation and other provided codes in MidiFile2 unit as below.

Delphi-Quellcode:

....

implementation

var
  isMetaLyric : Boolean;
  nMetaTextCount : Integer;

.....

function TMidiFile2.ReadFromFile(const FileName: WideString): Boolean;
var
  FileInfo: TMidiFileInfo;
  I,N: Integer;
begin
  FLyricsTrack := -1;
  FLyrics := '';
  if isMetaLyric then isMetaLyric := False; // Added by midijor
  nMetaTextCount := 0; // Added by midijor

.............
end;

// In SaveMetaEvent procedure
procedure SaveMetaEvent(Status_: byte; Elapsed_: LongWord);
var
  ......
  DataType2 : byte; // Added by midijor
  str3 : AnsiString; // Added by midijor
  ......
begin
  ...........
    TempoMap[TempoCounter-1].Tempo := Tempo;
   end else
   // Added by midijor
   if DataType = $05 then // for metaLyric
   begin
      New(pEvent);
      pEvent^.Event := Status_;
      pEvent^.Positon := Elapsed_;
      pEvent^.Data1 := DataType;
      pEvent^.Msg := str2;
      if isMetaLyric = false then isMetaLyric := True; // isMetaLyric founded
      MidiTrack.AddEvent(pEvent);
   end else
   if DataType = $01 then // for converting metaText to metaLyric
   begin
     if isMetaLyric = false then
     begin
       DataType2 := $05;
       if (str2[1] = '@') then //Chr($40)
       begin
         // some information
       end
       else
       if str2[1] = Chr($5C) then // '\' clear line.
       begin

         if nMetaTextCount > 0 then
         begin

           str3 := Chr(10);
           New(pEvent);
           pEvent^.Event := Status_;
           pEvent^.Positon := Elapsed_;
           pEvent^.Data1 := DataType2;
           pEvent^.Msg := str3;
           MidiTrack.AddEvent(pEvent);

           str3 := ' '+ Chr($A); //for new line
           New(pEvent);
           pEvent^.Event := Status_;
           pEvent^.Positon := Elapsed_;
           pEvent^.Data1 := DataType2;
           pEvent^.Msg := str3;
           MidiTrack.AddEvent(pEvent);
         end;
         nMetaTextCount := nMetaTextCount + 1;

         str3 := Copy(str2, 2, Length(str2) -1);
         New(pEvent);
         pEvent^.Event := Status_;
         pEvent^.Positon := Elapsed_;
         pEvent^.Data1 := DataType2;
         pEvent^.Msg := str3;
         MidiTrack.AddEvent(pEvent);
       end
       else
       if str2[1] = Chr($2F) then // New Line '/'
       begin
         str3 := ' '+ Chr($A); //for new line
         New(pEvent);
         pEvent^.Event := Status_;
         pEvent^.Positon := Elapsed_;
         pEvent^.Data1 := DataType2;
         pEvent^.Msg := str3;
         MidiTrack.AddEvent(pEvent);

         str3 := Copy(str2, 2, Length(str2) -1);
         New(pEvent);
         pEvent^.Event := Status_;
         pEvent^.Positon := Elapsed_;
         pEvent^.Data1 := DataType2;
         pEvent^.Msg := str3;
         MidiTrack.AddEvent(pEvent);
       end
       else
       begin

         New(pEvent);
         pEvent^.Event := Status_;
         pEvent^.Positon := Elapsed_;
         pEvent^.Data1 := DataType2;
         pEvent^.Msg := str2;
         MidiTrack.AddEvent(pEvent);

       end;
     end; // if MidiTrack.isMetaLyric = false then
   end else
   if DataType = $02 then
   begin
     New(pEvent);
     pEvent^.Event := Status_;
     pEvent^.Positon := Elapsed_;
     pEvent^.Data1 := DataType;
     pEvent^.Msg := str2;
     MidiTrack.AddEvent(pEvent);
   end else
   if DataType = $03 then
   begin
     New(pEvent);
     pEvent^.Event := Status_;
     pEvent^.Positon := Elapsed_;
     pEvent^.Data1 := DataType;
     pEvent^.Msg := str2;
     MidiTrack.AddEvent(pEvent);
   end else
   if DataType = $04 then
   begin
     New(pEvent);
     pEvent^.Event := Status_;
     pEvent^.Positon := Elapsed_;
     pEvent^.Data1 := DataType;
     pEvent^.Msg := str2;
     MidiTrack.AddEvent(pEvent);
   end;
end;
           
...........
I hope, you'll do better than me and your "KaraGL" project supports the standard midifile...

Best regards,
midijor

Geändert von midijorss (24. Jun 2012 um 11:24 Uhr)
  Mit Zitat antworten Zitat
EWeiss
(Gast)

n/a Beiträge
 
#6

AW: TMIDIPlayer2

  Alt 24. Jun 2012, 12:44
Thanks for the Information
i have added all this by me and silhwan self

see here.

Delphi-Quellcode:
    case Event^.Data1 of
      // ** MIDI Karaoke file type 1 (Soft Karaoke) uses data type code $1 for recording lyrics
      // ** instead of data type code $5.
      // ** The identifier of this file type is text "@KMIDI KARAOKE FILE" as the first text at position 0.
      // ** (Applied at ver 0.9.5)
      $1: begin
        if FTrackKeyword = 'then
          if (Event^.Positon = 0) and (Event^.Msg = '@KMIDI KARAOKE FILE') then
            FFoundKaraokeId := true
          else
          // The name of Track 1 = "Soft Karaoke", Track 2 = "Words"
          if FFoundKaraokeId2 and (FTrackName = 'Words') then
            FFoundKaraokeId := true;
            // For very suspicious karaoke file
            if not FFoundKaraokeId then
              if FTrackName = 'Wordsthen
                if High(FRawLyrics) = -1 then
                  if pos('@L', string(FTrackKeyword)) <> 0 then
                    if pos('@T', string(FTrackKeyword)) <> 0 then
                      FFoundKaraokeId := true;
best regards Emil

ps.. the last File show as see image
i can not upload the source on this time without permission of Silhwan. (es geht nichts über Denglish)

Geändert von EWeiss (11. Jul 2019 um 15:41 Uhr)
  Mit Zitat antworten Zitat
midijorss

Registriert seit: 3. Feb 2010
7 Beiträge
 
#7

AW: TMIDIPlayer2

  Alt 24. Jun 2012, 13:25
Thanks for the Information
i have added all this by me and silhwan self

see here.

Delphi-Quellcode:
    case Event^.Data1 of
      // ** MIDI Karaoke file type 1 (Soft Karaoke) uses data type code $1 for recording lyrics
      // ** instead of data type code $5.
      // ** The identifier of this file type is text "@KMIDI KARAOKE FILE" as the first text at position 0.
      // ** (Applied at ver 0.9.5)
      $1: begin
        if FTrackKeyword = 'then
          if (Event^.Positon = 0) and (Event^.Msg = '@KMIDI KARAOKE FILE') then
            FFoundKaraokeId := true
          else
          // The name of Track 1 = "Soft Karaoke", Track 2 = "Words"
          if FFoundKaraokeId2 and (FTrackName = 'Words') then
            FFoundKaraokeId := true;
            // For very suspicious karaoke file
            if not FFoundKaraokeId then
              if FTrackName = 'Wordsthen
                if High(FRawLyrics) = -1 then
                  if pos('@L', string(FTrackKeyword)) <> 0 then
                    if pos('@T', string(FTrackKeyword)) <> 0 then
                      FFoundKaraokeId := true;
best regards Emil

ps.. the last File show as see image
i can not upload the source on this time without permission of Silhwan. (es geht nichts über Denglish)
Hi,

Your coding method is very nice
And the KMIDIPlayer seems an advanced midi player...

I understand about permission of Silhwan.
I hope, he publish the source codes on Delphi-PRAXIS forum...

Best regards,
midijor
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz