| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
music: Tonleitern with one commands Play: Dur and (harmonisches) Moll
PRFellow-Presentation
Author: Thomas Hölzer
Tonleitern with one commands Play:
Dur and (harmonisches) Moll
Parameter:
1: name the Grundtons $; 2: length %, 3: Punktierung %, 4: Höhe %
$O+
Proc Dur
Parameters start$,l%,p%,h%
Declare t%,i%
start$=Upper $(start$)
Case start$=C: t%=1
Case start$=C#: t%=2
Case start$=Db: t%=2
Case start$=D: t%=3
Case start$=D#: t%=4
Case start$=Eb: t%=4
Case start$=E: t%=5
Case start$=F: t%=6
Case start$=F#: t%=7
Case start$=Gb: t%=7
Case start$=G: t%=8
Case start$=G#: t%=9
Case start$=ex: t%=9
Case start$=A: t%=10
Case start$=A#: t%=11
Case start$=Hb: t%=11
Case start$=B: t%=11
Case start$=H: t%=12
t%= t% + 12 * h%
i%=1
Play t%+i%,l%,p%
While (i% < 13)
If (i%=5) Or (i%=9) Or (i%=12)
Inc i%
Else
Add i%,2
EndIf
Play t%+i%,l%,p%
Wend
ENDPROC
Proc Moll
Parameters start$,l%,p%,h%
Declare t%,i%
start$=Upper $(start$)
Case start$=C: t%=1
Case start$=C#: t%=2
Case start$=Db: t%=2
Case start$=D: t%=3
Case start$=D#: t%=4
Case start$=Eb: t%=4
Case start$=E: t%=5
Case start$=F: t%=6
Case start$=F#: t%=7
Case start$=Gb: t%=7
Case start$=G: t%=8
Case start$=G#: t%=9
Case start$=ex: t%=9
Case start$=A: t%=10
Case start$=A#: t%=11
Case start$=Hb: t%=11
Case start$=B: t%=11
Case start$=H: t%=12
t%= t% + 12 * h%
i%=1
Play t%+i%,l%,p%
While (i% < 12)
If (i%=3) Or (i%=8)
Inc i%
Else
Add i%,2
EndIf
Play t%+i%,l%,p%
Wend
ENDPROC
example
Cls
Window Title Add$(GetText$(%hwnd), - Powered by PRFellow)
Dur C,4,0,5
Moll C,4,0,5
|
|
|
| |
|
|