English
Forum

MIDI-File write XProfan/FreeProfan

 

RGH
it was of course not integrally simply, The required Information to find, but now works it: the Program writes a Midi-File with two Kanälen: organ left and Schlagzeug right.
I have it attempts a little bit To to comment, so Own Experimente possible are.

Greeting
Roland
CompileMarkSeparation
// Globale Variablen
Declare Integer Kanal, Anschlag, Oktave, String Musik
// Noten-Konstanten
Def %C- -1
Def %C 0
Def %C# 1
Def %D- 1
Def %D 2
Def %D# 3
Def %E- 3
Def %E 4
Def %E# 5
Def %F- 4
Def %F 5
Def %F# 6
Def %G- 6
Def %G 7
Def %G# 8
Def %A- 8
Def %A 9
Def %A# 10
Def %B- 10
Def %B 11
Def %B# 12
// Deutsche Schreibweise
Def %H- 10
Def %H 11
Def %H# 12
// Pause
Def %P $FF

Proc writeHex

    Parameters String sHex
    Declare Integer iLen, iByte
    iLen = len(sHex)/2

    WhileLoop 1, iLen

        iByte = val("$" + left$(sHex,2))
        PutByte #1, iByte
        sHex = Del$(sHex,1,2)

    EndWhile

EndProc

Proc writeByte

    Parameters Integer iByte
    PutByte #1, iByte

EndProc

Proc writeWord

    Parameters Integer iWord
    PutByte #1, iWord \ 256
    PutByte #1, iWord mod 256

EndProc

Proc writeLong

    Parameters Integer iLong
    writeWord(HiWord(iLong))
    writeWord(LoWord(iLong))

EndProc

Proc writeChars

    Parameters String sChars
    PutChar #1, sChars

EndProc

Proc Header

    Parameters Integer iTracks, iTempo
    writeChars("MThd")
    writeLong(6)
    writeWord(1)
    writeWord(iTracks)
    writeWord(iTempo)

EndProc

Proc TrackHeader

    Declare Pointer pAnzahl
    writeChars("MTrk")
    pAnzahl = FilePos(#1)
    writeLong(0)
    writeByte(0)
    Return pAnzahl

EndProc

Proc writeDauer

    Parameters Integer D
    // Deltatime in variable Bitlänge (1 oder 2) umwandeln
    // in dieser Fassung bis max. 0 .. 16383

    if D > 127' Deltatime = 2 Bytes

        writeByte(128 + D \ 128)
        writeByte(D mod 128)

    else' Deltatime = 1 Byte

        writeByte(D)

    endif

EndProc

Proc Note

    Parameters Integer Note, Dauer
    Declare Integer Ton, TonDauer, StummDauer
    Ton = 12 * Oktave + Note

    Select Musik

        CaseOf "N" : TonDauer = Dauer * 7 \ 8

        CaseOf "S" : TonDauer = Dauer * 4 \ 8

        CaseOf "L" : TonDauer = Dauer

    EndSelect

    Case Note = %P : TonDauer = 0
    StummDauer = Dauer - TonDauer

    If TonDauer > 0

        writeByte($90 + Kanal)' Note an auf Kanal
        writeByte(Ton)
        writeByte(Anschlag)' Anschlag
        writeDauer(TonDauer)

    EndIf

    writeByte($80 + Kanal)' Note aus auf Kanal
    writeByte(Ton)
    writeByte(0)' Anschlag 0 = stumm
    writeDauer(Stummdauer)' Zeit bis zur nächsten Note

EndProc

Proc Volume

    Parameters Integer Vol
    writeByte($B0 + Kanal)
    writeByte(7)
    writeByte(Vol)
    writeByte(0)

EndProc

Proc Stereo

    Parameters Integer Pos
    writeByte($B0 + Kanal)
    writeByte(10)
    writeByte(Pos)
    writeByte(0)

EndProc

Proc Instrument

    Parameters Integer Instrument
    writeByte($C0 + Kanal)
    writeByte(Instrument)
    writeByte(0)

EndProc

Proc TrackEnd

    Declare Longint TrackEndPos
    WriteHex("FF2F00")
    TrackEndPos = FilePos(#1)
    Return TrackEndPos

EndProc

// Hauptprogramm
// =============
Declare Longint pAnz, lAnzahl, lTrackStart, lTrackEnd
// Globale Einstellungen, die immer für alle folgenden Noten (Note, Pause)
// bis zur nächsten Änderung gelten
Kanal = 0
Anschlag = 127
Oktave = 4
Musik = "N"' Möglich sind "L"egato, "N"ormal, "S"taccato
// Datei anlegen bzw. öffnen, ggf. vorher löschen
Assign #1, "test.mid"
Erase #1
OpenRW #1
// Header schreiben; Parameter Tracks, Tempo (Viertelnoten/Minute)
Header(2,120)
// Track 1
// Trackheader schreiben; Rückgabe Position für Tracklänge in Bytes
pAnz = TrackHeader()
lTrackStart = FilePos(#1)
// Einstellungen
Volume(127)' Lautstärke 127
Stereo(0)' links
Instrument(16)' Orgel
// Hier kommt die Musik
// Parameter Note, Dauer (in Ticks: 120 = Viertel, 60 = Achtel, etc.)
Musik = "L"
Oktave = 5
Note(%A,120)
Note(%B,120)
Oktave = 6
Note(%C#,60)
Note(%D,60)
Note(%P,120)
Note(%E,120)
Note(%F#,120)
Note(%G#,120)
Note(%A,120)
TrackEnd
lTrackEnd = FilePos(#1)
lAnzahl = lTrackEnd - lTrackStart + 1
Print lAnzahl
Seek #1, pAnz
writeLong(lAnzahl)
// Track 2
// Schreibposition wieder ans Ende setzen
Seek #1, getFileSize(#1)
// Trackheader schreiben; Rückgabe Position für Tracklänge in Bytes
pAnz = TrackHeader()
lTrackStart = FilePos(#1)
// Einstellungen
Kanal = 9' Schlagzeug
Volume(127)' Lautstärke 127
Stereo(127)' rechts
Instrument(25)
Oktave = 3

WhileLoop 4

    Note(%C,30)
    Note(%F#,30)
    Note(%A#,30)
    Note(%F#,30)
    Note(%D,30)
    Note(%F#,30)
    Note(%A#,30)
    Note(%F#,30)

EndWhile

TrackEnd
lTrackEnd = FilePos(#1)
lAnzahl = lTrackEnd - lTrackStart + 1
Print lAnzahl
Seek #1, pAnz
writeLong(lAnzahl)
Close #1
MCISend$("OPEN test.mid TYPE SEQUENCER ALIAS MIDI")
MCISend$("PLAY MIDI WAIT")
MCISend$("CLOSE MIDI"pan>
Print "Fertig!"
WaitInput
End
 
XProfan X2
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
03/15/13  
 





On each drop very calm,

too The Operators-characters into Konstantenbezeichnung toppen same
again everything around the factor infinite!

Should I almost same time my older computer on the Midikeyb connect
and a bisschen XProfan-View source einspielen -

time Jörgs Midi-IN raussuchen.
 
03/15/13  
 



Nu lifted i ka pleasure More,

ought to one Fur Elise go -

to disengaged usage! ^^
CompileMarkSeparation
proc note2

    Parameters Integer Note, Okt,Dauer
    Oktave=okt
    Note(Note,Dauer)

endproc

Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%B,5,40)
Note2(%D,6,40)
Note2(%C,6,40)
Note2(%A,3,5)
Note2(%A,5,45)
Note2(%E,4,35)
Note2(%A,4,50)
Note2(%C,5,25)
Note2(%E,5,45)
Note2(%A,5,35)
Note2(%E,3,5)
Note2(%B,5,45)
Note2(%E,4,35)
Note2(%G#,4,50)
Note2(%E,5,25)
Note2(%G#,5,45)
Note2(%B,5,35)
Note2(%A,3,5)
Note2(%C,6,45)
Note2(%E,4,35)
Note2(%A,4,50)
Note2(%E,5,25)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%B,5,40)
Note2(%D,6,40)
Note2(%C,6,45)
Note2(%A,3,5)
Note2(%A,5,45)
Note2(%E,4,35)
Note2(%A,4,50)
Note2(%C,5,25)
Note2(%E,5,45)
Note2(%A,5,35)
Note2(%E,3,5)
Note2(%B,5,45)
Note2(%E,4,35)
Note2(%G#,4,50)
Note2(%E,5,25)
Note2(%C,6,45)
Note2(%B,5,35)
Note2(%A,5,5)
Note2(%A,3,45)
Note2(%E,4,45)
Note2(%A,4,65)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%B,5,40)
Note2(%D,6,40)
Note2(%C,6,40)
Note2(%A,3,5)
Note2(%A,5,45)
Note2(%E,4,35)
Note2(%A,4,50)
Note2(%C,5,40)
Note2(%E,5,25)
Note2(%A,5,40)
Note2(%E,3,5)
Note2(%B,5,45)
Note2(%E,4,40)
Note2(%G#,4,50)
Note2(%E,5,40)
Note2(%G#,5,25)
Note2(%B,5,40)
Note2(%A,3,5)
Note2(%C,6,45)
Note2(%E,4,35)
Note2(%A,4,50)
Note2(%E,5,25)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%D#,6,40)
Note2(%E,6,40)
Note2(%B,5,40)
Note2(%D,6,40)
Note2(%C,6,40)
Note2(%A,3,15)
Note2(%A,5,30)
Note2(%E,4,50)
Note2(%A,4,35)
Note2(%C,5,40)
Note2(%E,5,45)
Note2(%A,5,25)
Note2(%E,3,5)
Note2(%B,5,45)
Note2(%E,4,35)
Note2(%G#,4,50)
Note2(%E,5,35)
Note2(%C,6,45)
Note2(%B,5,25)
Note2(%A,3,5)
Note2(%A,5,45)
Note2(%E,4,45)
Note2(%A,4,25)
Note2(%B,5,45)
Note2(%C,6,40)
Note2(%D,6,40)
Note2(%C,4,10)
Note2(%E,6,45)
Note2(%G,4,30)
Note2(%C,5,45)
Note2(%G,5,35)
Note2(%F,6,45)
Note2(%E,6,30)
Note2(%G,3,5)
Note2(%D,6,50)
Note2(%G,4,35)
Note2(%B,4,35)
Note2(%F,5,40)
Note2(%E,6,45)
Note2(%D,6,30)
Note2(%A,3,5)
Note2(%C,6,50)
Note2(%E,4,35)
Note2(%A,4,35)
Note2(%E,5,40)
Note2(%D,6,45)
Note2(%C,6,30)
Note2(%E,3,5)
Note2(%B,5,50)
Note2(%E,4,30)
Note2(%E,5,40)
Note2(%E,5,45)
Note2(%E,6,30)
Note2(%E,5,45)
Note2(%E,6,35)
Note2(%E,6,40)
Note2(%E,7,40)
Note2(%D#,6,40)
Note2(%E,6,40)

plenty Fun!
 
03/15/13  
 




RGH
Ooooch .... straight wenn's tensive becomes, is Schluß!

Greeting
Roland
 
XProfan X2
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
03/16/13  
 



OK, type tommorrow another couple More notes to a.
 
03/16/13  
 




Jörg
Sellmeyer
super!!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/16/13  
 



How promised:
CompileMarkSeparation
'{$cleq}
// Globale Variablen
Declare Integer Kanal, Anschlag, Oktave, String Musik
// Noten-Konstanten
Def %C- -1
Def %C 0
Def %C# 1
Def %D- 1
Def %D 2
Def %D# 3
Def %E- 3
Def %E 4
Def %E# 5
Def %F- 4
Def %F 5
Def %F# 6
Def %G- 6
Def %G 7
Def %G# 8
Def %A- 8
Def %A 9
Def %A# 10
Def %B- 10
Def %B 11
Def %B# 12
// Deutsche Schreibweise
Def %H- 10
Def %H 11
Def %H# 12
// Pause
Def %P $FF

Proc writeHex

    Parameters String sHex
    Declare Integer iLen, iByte
    iLen = len(sHex)/2

    WhileLoop 1, iLen

        iByte = val("$" + left$(sHex,2))
        PutByte #1, iByte
        sHex = Del$(sHex,1,2)

    EndWhile

EndProc

Proc writeByte

    Parameters Integer iByte
    PutByte #1, iByte

EndProc

Proc writeWord

    Parameters Integer iWord
    PutByte #1, iWord \ 256
    PutByte #1, iWord mod 256

EndProc

Proc writeLong

    Parameters Integer iLong
    writeWord(HiWord(iLong))
    writeWord(LoWord(iLong))

EndProc

Proc writeChars

    Parameters String sChars
    PutChar #1, sChars

EndProc

Proc Header

    Parameters Integer iTracks, iTempo
    writeChars("MThd")
    writeLong(6)
    writeWord(1)
    writeWord(iTracks)
    writeWord(iTempo)

EndProc

Proc TrackHeader

    Declare Pointer pAnzahl
    writeChars("MTrk")
    pAnzahl = FilePos(#1)
    writeLong(0)
    writeByte(0)
    Return pAnzahl

EndProc

Proc writeDauer

    Parameters Integer D
    // Deltatime in variable Bitlänge (1 oder 2) umwandeln
    // in dieser Fassung bis max. 0 .. 16383

    if D > 127' Deltatime = 2 Bytes

        writeByte(128 + D \ 128)
        writeByte(D mod 128)

    else' Deltatime = 1 Byte

        writeByte(D)

    endif

EndProc

proc note2

    Parameters Integer Note, Okt,Dauer
    Oktave=okt
    Note(Note,Dauer)

endproc

Proc Note

    Parameters Integer Note, Dauer
    Declare Integer Ton, TonDauer, StummDauer
    Ton = 12 * Oktave + Note

    Select Musik

        CaseOf "N" : TonDauer = Dauer * 7 \ 8

        CaseOf "S" : TonDauer = Dauer * 4 \ 8

        CaseOf "L" : TonDauer = Dauer

    EndSelect

    Case Note = %P : TonDauer = 0
    StummDauer = Dauer - TonDauer

    If TonDauer > 0

        writeByte($90 + Kanal)' Note an auf Kanal
        writeByte(Ton)
        writeByte(Anschlag)' Anschlag
        writeDauer(TonDauer)

    EndIf

    writeByte($80 + Kanal)' Note aus auf Kanal
    writeByte(Ton)
    writeByte(0)' Anschlag 0 = stumm
    writeDauer(Stummdauer)' Zeit bis zur nächsten Note

EndProc

Proc Volume

    Parameters Integer Vol
    writeByte($B0 + Kanal)
    writeByte(7)
    writeByte(Vol)
    writeByte(0)

EndProc

Proc Stereo

    Parameters Integer Pos
    writeByte($B0 + Kanal)
    writeByte(10)
    writeByte(Pos)
    writeByte(0)

EndProc

Proc Instrument

    Parameters Integer Instrument
    writeByte($C0 + Kanal)
    writeByte(Instrument)
    writeByte(0)

EndProc

Proc TrackEnd

    Declare Longint TrackEndPos
    WriteHex("FF2F00")
    TrackEndPos = FilePos(#1)
    Return TrackEndPos

EndProc

// Hauptprogramm
// =============
Declare Longint pAnz, lAnzahl, lTrackStart, lTrackEnd
// Globale Einstellungen, die immer für alle folgenden Noten (Note, Pause)
// bis zur nächsten Änderung gelten
Kanal = 0
Anschlag = 127
Oktave = 4
Musik = "N"' Möglich sind "L"egato, "N"ormal, "S"taccato
// Datei anlegen bzw. öffnen, ggf. vorher löschen
Assign #1, "test.mid"
Erase #1
OpenRW #1
// Header schreiben; Parameter Tracks, Tempo (Viertelnoten/Minute)
Header(2,100)
// Track 1
// Trackheader schreiben; Rückgabe Position für Tracklänge in Bytes
pAnz = TrackHeader()
lTrackStart = FilePos(#1)
// Einstellungen
Volume(127)' Lautstärke 127
Stereo(0)' links
Instrument(0)' Piano
// Hier kommt die Musik
// Parameter Note, Dauer (in Ticks: 120 = Viertel, 60 = Achtel, etc.)
Musik = "N"

whileloop 4

    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%B,5,40)
    Note2(%D,6,40)
    Note2(%C,6,40)
    Note2(%A,3,10)
    Note2(%A,5,45)
    Note2(%E,4,35)
    Note2(%A,4,35)
    Note2(%C,5,40)
    Note2(%E,5,45)
    Note2(%A,5,30)
    Note2(%E,3,5)
    Note2(%B,5,50)
    Note2(%E,4,30)
    Note2(%G#,4,45)
    Note2(%E,5,35)
    Note2(%G#,5,45)
    Note2(%B,5,30)
    Note2(%A,3,5)
    Note2(%C,6,50)
    Note2(%E,4,30)
    Note2(%A,4,35)
    Note2(%E,5,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,45)
    Note2(%E,6,40)
    Note2(%B,5,40)
    Note2(%D,6,40)
    Note2(%C,6,40)
    Note2(%A,3,5)
    Note2(%A,5,45)
    Note2(%E,4,35)
    Note2(%A,4,50)
    Note2(%C,5,40)
    Note2(%E,5,25)
    Note2(%A,5,40)
    Note2(%E,3,5)
    Note2(%B,5,45)
    Note2(%E,4,35)
    Note2(%G#,4,50)
    Note2(%E,5,40)
    Note2(%C,6,25)
    Note2(%B,5,40)
    Note2(%A,3,5)
    Note2(%A,5,45)
    Note2(%E,4,35)
    Note2(%A,4,35)
    Note2(%B,5,40)
    Note2(%C,6,40)
    Note2(%D,6,40)
    Note2(%C,4,10)
    Note2(%E,6,45)
    Note2(%G,4,30)
    Note2(%C,5,45)
    Note2(%G,5,35)
    Note2(%F,6,45)
    Note2(%E,6,30)
    Note2(%G,3,5)
    Note2(%D,6,50)
    Note2(%G,4,35)
    Note2(%B,4,35)
    Note2(%F,5,45)
    Note2(%E,6,45)
    Note2(%D,6,30)
    Note2(%A,3,5)
    Note2(%C,6,50)
    Note2(%E,4,30)
    Note2(%A,4,45)
    Note2(%E,5,35)
    Note2(%D,6,45)
    Note2(%C,6,30)
    Note2(%E,3,5)
    Note2(%B,5,50)
    Note2(%E,4,25)
    Note2(%E,5,40)
    Note2(%E,5,45)
    Note2(%E,6,35)
    Note2(%E,5,45)
    Note2(%E,6,35)
    Note2(%E,6,40)
    Note2(%E,7,50)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,45)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%B,5,40)
    Note2(%D,6,40)
    Note2(%C,6,30)
    Note2(%A,5,15)
    Note2(%A,3,30)
    Note2(%E,4,35)
    Note2(%A,4,50)
    Note2(%C,5,45)
    Note2(%E,5,25)
    Note2(%A,5,40)
    Note2(%E,3,5)
    Note2(%B,5,45)
    Note2(%E,4,35)
    Note2(%G#,4,50)
    Note2(%E,5,40)
    Note2(%G#,5,25)
    Note2(%B,5,40)
    Note2(%A,3,5)
    Note2(%C,6,45)
    Note2(%E,4,35)
    Note2(%A,4,35)
    Note2(%E,5,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,40)
    Note2(%B,5,40)
    Note2(%D,6,40)
    Note2(%C,6,40)
    Note2(%A,3,10)
    Note2(%A,5,45)
    Note2(%E,4,35)
    Note2(%A,4,35)
    Note2(%C,5,40)
    Note2(%E,5,45)
    Note2(%A,5,30)
    Note2(%E,3,5)
    Note2(%B,5,50)
    Note2(%E,4,35)
    Note2(%G#,4,45)
    Note2(%E,5,35)
    Note2(%C,6,45)
    Note2(%B,5,30)
    Note2(%A,3,5)
    Note2(%A,5,50)
    Note2(%E,4,30)
    Note2(%A,4,40)
    Note2(%C,5,5)
    Note2(%A#,4,5)
    Note2(%C,6,35)
    Note2(%F,5,5)
    Note2(%C,6,25)
    Note2(%G,4,5)
    Note2(%F,5,5)
    Note2(%C,6,5)
    Note2(%G,5,10)
    Note2(%A,5,15)
    Note2(%F,4,5)
    Note2(%C,6,45)
    Note2(%A,4,45)
    Note2(%C,5,70)
    Note2(%F,6,60)
    Note2(%E,6,15)
    Note2(%F,4,5)
    Note2(%E,6,45)
    Note2(%A#,4,35)
    Note2(%D,6,10)
    Note2(%D,5,70)
    Note2(%D,5,5)
    Note2(%A#,6,60)
    Note2(%A,6,10)
    Note2(%F,4,5)
    Note2(%A,6,45)
    Note2(%E,5,5)
    Note2(%G,6,25)
    Note2(%F,6,5)
    Note2(%F,4,5)
    Note2(%G,4,5)
    Note2(%A#,4,25)
    Note2(%E,6,5)
    Note2(%E,5,35)
    Note2(%A#,4,5)
    Note2(%F,4,5)
    Note2(%G,4,5)
    Note2(%D,6,35)
    Note2(%C,6,5)
    Note2(%E,5,35)
    Note2(%A#,5,30)
    Note2(%A,4,40)
    Note2(%A,5,5)
    Note2(%C,5,40)
    Note2(%A,4,30)
    Note2(%A#,5,10)
    Note2(%C,5,5)
    Note2(%A,5,20)
    Note2(%G,5,15)
    Note2(%A,4,5)
    Note2(%A,5,20)
    Note2(%A#,5,15)
    Note2(%F,4,5)
    Note2(%C,6,50)
    Note2(%A,4,40)
    Note2(%C,5,70)
    Note2(%D,6,40)
    Note2(%D#,6,35)
    Note2(%E,4,5)
    Note2(%E,6,50)
    Note2(%A,4,30)
    Note2(%C,5,75)
    Note2(%D,5,5)
    Note2(%D,4,10)
    Note2(%F,6,35)
    Note2(%A,5,5)
    Note2(%F,4,25)
    Note2(%G,4,5)
    Note2(%C,6,50)
    Note2(%E,5,65)
    Note2(%D,6,20)
    Note2(%B,5,5)
    Note2(%C,6,15)
    Note2(%G,4,5)
    Note2(%D,6,10)
    Note2(%C,6,35)
    Note2(%F,5,15)
    Note2(%B,5,15)
    Note2(%C,6,5)
    Note2(%C,5,5)
    Note2(%E,5,25)
    Note2(%G,6,20)
    Note2(%G,5,25)
    Note2(%A,5,20)
    Note2(%G,6,20)
    Note2(%F,5,5)
    Note2(%G,5,5)
    Note2(%B,5,20)
    Note2(%G,6,10)
    Note2(%E,5,5)
    Note2(%G,5,5)
    Note2(%C,6,20)
    Note2(%G,6,10)
    Note2(%D,5,5)
    Note2(%F,5,5)
    Note2(%G,5,5)
    Note2(%D,6,20)
    Note2(%G,6,5)
    Note2(%E,6,35)
    Note2(%G,6,10)
    Note2(%C,7,25)
    Note2(%B,6,10)
    Note2(%F,4,5)
    Note2(%A,4,5)
    Note2(%A,6,20)
    Note2(%G,6,20)
    Note2(%F,6,20)
    Note2(%E,6,10)
    Note2(%G,4,5)
    Note2(%B,4,5)
    Note2(%D,6,20)
    Note2(%G,6,20)
    Note2(%F,6,20)
    Note2(%D,6,15)
    Note2(%C,6,5)
    Note2(%C,5,25)
    Note2(%G,6,20)
    Note2(%G,5,25)
    Note2(%G,6,10)
    Note2(%A,5,30)
    Note2(%G,6,10)
    Note2(%F,5,10)
    Note2(%B,5,15)
    Note2(%G,6,15)
    Note2(%E,5,25)
    Note2(%G,6,10)
    Note2(%D,5,5)
    Note2(%D,6,5)
    Note2(%F,5,15)
    Note2(%G,6,15)
    Note2(%E,6,5)
    Note2(%C,5,5)
    Note2(%E,5,5)
    Note2(%G,5,15)
    Note2(%G,6,25)
    Note2(%C,7,5)
    Note2(%B,6,20)
    Note2(%F,4,5)
    Note2(%A,4,5)
    Note2(%A,6,20)
    Note2(%G,6,20)
    Note2(%F,6,20)
    Note2(%E,6,10)
    Note2(%G,4,5)
    Note2(%B,4,5)
    Note2(%D,6,20)
    Note2(%G,6,20)
    Note2(%F,6,20)
    Note2(%D,6,10)
    Note2(%E,6,5)
    Note2(%B,4,5)
    Note2(%G#,4,25)
    Note2(%F,6,35)
    Note2(%D#,6,35)
    Note2(%B,5,130)
    Note2(%D#,6,20)
    Note2(%E,6,120)
    Note2(%B,5,40)
    Note2(%E,6,40)
    Note2(%D#,6,40)
    Note2(%E,6,120)
    Note2(%B,5,25)
    Note2(%E,6,45)
    Note2(%D#,6,75)

wend

/*
Oktave = 5
Note(%A,120)
Note(%B,120)
Oktave = 6
Note(%C#,60)
Note(%D,60)
Note(%P,120)
Note(%E,120)
Note(%F#,120)
Note(%G#,120)
Note(%A,120)
*/
TrackEnd
lTrackEnd = FilePos(#1)
lAnzahl = lTrackEnd - lTrackStart + 1
Print lAnzahl
Seek #1, pAnz
writeLong(lAnzahl)
// Track 2
// Schreibposition wieder ans Ende setzen
Seek #1, getFileSize(#1)
// Trackheader schreiben; Rückgabe Position für Tracklänge in Bytes
pAnz = TrackHeader()
lTrackStart = FilePos(#1)
// Einstellungen
Kanal = 9' Schlagzeug
Volume(127)' Lautstärke 127
Stereo(127)' rechts
Instrument(25)
Oktave = 3
/*
WhileLoop 4
Note2(%C,3,30)
Note2(%F#,4,30)
Note2(%A#,3,30)
Note2(%F#,4,30)
Note2(%D,3,30)
Note2(%F#,4,30)
Note2(%A#,3,30)
Note2(%F#,4,30)
EndWhile
*/
TrackEnd
lTrackEnd = FilePos(#1)
lAnzahl = lTrackEnd - lTrackStart + 1
Print lAnzahl
Seek #1, pAnz
writeLong(lAnzahl)
Close #1
MCISend$("OPEN test.mid TYPE SEQUENCER ALIAS MIDI")class=s4 href='./../../Function-References/XProfan/mcisend/'>MCISend$("PLAY MIDI WAIT")
$ MCISend("CLOSE MIDI")
Print "Fertig!"
WaitInput
End
 
03/16/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.008 Views

Untitledvor 0 min.
Jörg Sellmeyer05/15/18
Rainer Hoefs02/04/16
RGH05/28/15
iF04/12/15
More...

Themeninformationen

this Topic has 3 subscriber:

iF (4x)
RGH (2x)
Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie