/* @B Noten V.1.2 @P@ICopyright A.Faust 99 dieses Genie zeichnet Notenlinien und Noten */ /* History Version 1.1. (2.2.99) -einige Fehler in den #?.file Files beseitigt -die Notation im Notenfile geändert (wenn Auflösungszeichen - "a" - dann die gleiche Notation in einer Zeile wie in allen anderen Fällen) Version 1.2 (10.2.99) -Fehler bei der Eingabe von B-Vorzeichen beseitigt (z.B."AB3") -Vorzeichenroutine vereinfacht -Möglichkeit für einfache Notenliniensysteme mit nur einem Notenschlüssel (Bindfadenstimme) -Zusammenfassung mehrerer Abfragen in einem Requester -Erweiterung des Bereiches im Violinschlüssel */ address command 'execute C:AssignNotenDruck' /* Das File "AssignNotenDruck" im C: Verzeichnis muß mit einem normalen Texteditor erstellt werden, und legt fest, wo die Notenfiles gespeichert sind. Das macht die Auswahl später einfacher. Das Genie sucht zuerst im festgelegten Verzeichnis "Noten:" z.B. assign Noten: Work:MeinNotenFileVerzeichnis Als zweite Zeile MUSS ein Assign für das Genie-Verzeichnis von Propage gesetzt werden. z.B. assign Genies: DTP:ProPage/ARexx */ call SafeEndEdit.rexx() call ppm_AutoUpdate(0) call ppm_SetWireframe(0) notex=0 notey=0 call ppm_SetLineWeight(0.25) call ppm_SetMagMode(300) call ppm_SetBoxOutlines(0) signal on halt signal on break_c signal on break_e signal on break_d start: do neu = ppm_GetUserText(2, "Neubeginn? (ALLES WIRD GELÖSCHT !!!!) Nichts=ABBRUCH j/n") if neu == "J" then neu = "j" if neu == "N" then neu = "n" select when neu == "j" then do sicher = call ppm_New() call ppm_SetUnits(2) call ppm_SetMagMode(200) call ppm_SetFont('(CG)Times') pgnm = ppm_CreatePage(1, 1, 0) call ppm_SetPageType(pgnm, 4) call ppm_SetRulerType(4) call ppm_SetBoxLock(0, 0) call ppm_DeleteBox(0) /* Kopfzeile */ haedln = ppm_CreateBox(4, 0.2, 11.5, 1.2, 0) call ppm_SetSize(20) call ppm_SetStyle(U) call ppm_SetJustification(2) call ppm_TextIntoBox(haedln, 'Text') end when neu == "n" then notenlinien() otherwise exit_msg("ABBRUCH!") end notenlinien: cr = '0a'x form = "Notenlinien ? (j/n):j"cr"2/1 System (2/1v/1b):2"cr"Vorzeichen (1#=1 #):"cr"Taktart (4/4=4 4):4 4"cr"V_iol/B_aß [F_ile]:v" eingabe = ppm_GetForm("Bitte eingeben ... ", 5, form) parse var eingabe res '0a'x systemart '0a'x vorz '0a'x takt '0a'x violbass if systemart == '1B' then systemart = '1b' if systemart == '1V' then systemart = '1v' if res == '' then res = 'j' if res == 'J' then res = 'j' if res == 'j' then do call ppm_SetUnits(2) call ppm_SetMagMode(200) call ppm_SetFont('(CG)Times') pgnm = ppm_CurrentPage() call ppm_SetPageType(pgnm, 4) call ppm_SetRulerType(4) call ppm_SetBoxLock(0, 0) call ppm_DeleteBox(0) /* Kopfzeile */ haedln = ppm_CreateBox(4, 0.2, 11.5, 1.2, 0) call ppm_SetSize(20) call ppm_SetStyle(U) call ppm_SetJustification(2) call ppm_TextIntoBox(haedln, 'Titel') /* Autor */ autor = ppm_CreateBox(13, 0.9, 6.5, 0.64, 0) call ppm_SetSize(12) call ppm_SetStyle(U) call ppm_SetJustification(1) call ppm_TextIntoBox(autor, "Satz: © Autor") /* Notenlinien ziehen */ do a=1 to 12 do b=1 to 5 call ppm_DrawLine(0, a*2+((b-1)/5), 19.5, a*2+((b-1)/5)) end end /* Notenschlüssel und vordere Klammern */ if systemart == '1v' then do call ppm_SetFont('(CG)Noten') violschl = ppm_CreateBox(0, 1.55, 1, 1.6, 0) call ppm_SetStyle(N) call ppm_SetJustification(0) call ppm_SetSize(45) call ppm_TextIntoBox(violschl, 't') do c=1 to 11 call ppm_CloneBox(violschl, 0, (c*2)) end end if systemart == '1b' then do call ppm_SetFont('(CG)Noten') bassschl = ppm_CreateBox(0.034, 1.88, 1.1, 1.1, 0) call ppm_SetStyle(N) call ppm_SetJustification(0) call ppm_SetSize(30) call ppm_TextIntoBox(bassschl, 'b') do c=1 to 11 call ppm_CloneBox(bassschl, 0, (c*2)) end end if systemart == '2' then do call ppm_SetFont('(CG)Noten') violschl = ppm_CreateBox(0, 1.55, 1, 1.6, 0) call ppm_SetStyle(N) call ppm_SetJustification(0) call ppm_SetSize(45) call ppm_TextIntoBox(violschl, 't') bassschl = ppm_CreateBox(0.034, 3.88, 1.1, 1.1, 0) call ppm_SetSize(30) call ppm_TextIntoBox(bassschl, 'b') call ppm_SetLineWeight(4) vl = ppm_DrawLine(0, 1.98, 0, 4.82) call ppm_SetLineWeight(2) vo = ppm_DrawLine(-0.07, 2.08, 0.303, 1.7627) vu = ppm_DrawLine(-0.07, 4.74, 0.303, 5.052) do c=1 to 5 call ppm_CloneBox(violschl, 0, (c*4)) call ppm_CloneBox(bassschl, 0, (c*4)) call ppm_CloneBox(vl, 0, (c*4)) call ppm_CloneBox(vo, 0, (c*4)) call ppm_CloneBox(vu, 0, (c*4)) end end vorzeichen() end else do if res == 'N' then res = 'n' if res == 'n' then vorzeichen() else start() end end noteneingabe: if violbass == '' then notenlinien() resa = word(violbass,1) resb = word(violbass,2) if resa=='V' then resa = 'v' if resa=='B' then resa = 'b' if resb=='F' then resb = 'f' select when resa=='v' then violschl() when resa=='b' then basschl() otherwise noteneingabe() end violschl: do call ppm_SetFont('(CG)Noten') select when resb='' then do address command rx 'Genies:Violinenschlüssel.rexx' end when resb='f' then do address command rx 'Genies:Violinenschlüssel.file' end otherwise noteneingabe() end exit end basschl: do call ppm_SetFont('(CG)Noten') select when resb='' then do address command rx 'Genies:Bassschlüssel.rexx' end when resb='f' then do address command rx 'Genies:Bassschlüssel.file' end otherwise noteneingabe() end exit end exit vorzeichen: if vorz == "" then do k = 0 takt() end else do call ppm_SetFont('(CG)Noten') call ppm_SetSize(20) zahl = word(vorz, 1) if zahl >6 then vorzeichen() art = word(vorz, 2) if art == 'B' then art = 'b' yy = 0.28 j = 0 k = zahl select when art == 'b' then do art = 'f' if systemart == '2' then do do i=1 to 6 if zahl== 1 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) end if zahl == 2 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.2, (3.85+j) end if zahl == 3 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.2, (3.85+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.4, (4.25+j) end if zahl == 4 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.2, (3.85+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.4, (4.25+j) call vorzeichenbox 1.6, (1.75+j) call vorzeichenbox 1.6, (3.95+j) end if zahl == 5 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.2, (3.85+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.4, (4.25+j) call vorzeichenbox 1.6, (1.75+j) call vorzeichenbox 1.6, (3.95+j) call vorzeichenbox 1.8, (2.15+j) call vorzeichenbox 1.8, (4.35+j) end if zahl == 6 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1, (4.15+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.2, (3.85+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.4, (4.25+j) call vorzeichenbox 1.6, (1.75+j) call vorzeichenbox 1.6, (3.95+j) call vorzeichenbox 1.8, (2.15+j) call vorzeichenbox 1.8, (4.35+j) call vorzeichenbox 2.0, (1.85+j) call vorzeichenbox 2.0, (4.05+j) end j=j+4 end end if systemart == '1b' then do do i=1 to 12 if zahl== 1 then do call vorzeichenbox 1, (2.15+j) end if zahl == 2 then do call vorzeichenbox 1, (2.15+j) call vorzeichenbox 1.2, (1.85+j) end if zahl == 3 then do call vorzeichenbox 1, (2.15+j) call vorzeichenbox 1.2, (1.85+j) call vorzeichenbox 1.4, (2.25+j) end if zahl == 4 then do call vorzeichenbox 1, (2.15+j) call vorzeichenbox 1.2, (1.85+j) call vorzeichenbox 1.4, (2.25+j) call vorzeichenbox 1.6, (1.95+j) end if zahl == 5 then do call vorzeichenbox 1, (2.15+j) call vorzeichenbox 1.2, (1.85+j) call vorzeichenbox 1.4, (2.25+j) call vorzeichenbox 1.6, (1.95+j) call vorzeichenbox 1.8, (2.35+j) end if zahl == 6 then do call vorzeichenbox 1, (2.15+j) call vorzeichenbox 1.2, (1.85+j) call vorzeichenbox 1.4, (2.25+j) call vorzeichenbox 1.6, (1.95+j) call vorzeichenbox 1.8, (2.35+j) call vorzeichenbox 2.0, (2.05+j) end j=j+2 end end if systemart == '1v' then do do i=1 to 12 if zahl== 1 then do call vorzeichenbox 1, (1.95+j) end if zahl == 2 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1.2, (1.65+j) end if zahl == 3 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.4, (2.05+j) end if zahl == 4 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.6, (1.75+j) end if zahl == 5 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.6, (1.75+j) call vorzeichenbox 1.8, (2.15+j) end if zahl == 6 then do call vorzeichenbox 1, (1.95+j) call vorzeichenbox 1.2, (1.65+j) call vorzeichenbox 1.4, (2.05+j) call vorzeichenbox 1.6, (1.75+j) call vorzeichenbox 1.8, (2.15+j) call vorzeichenbox 2.0, (1.85+j) end j=j+2 end end end when art == '#' then do art = 's' if systemart == '2' then do do i=1 to 6 if zahl == 1 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) end if zahl == 2 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.2, (4.17+j) end if zahl == 3 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.2, (4.17+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.4, (3.77+j) end if zahl == 4 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.2, (4.17+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.4, (3.77+j) call vorzeichenbox 1.6, (1.87+j) call vorzeichenbox 1.6, (4.07+j) end if zahl == 5 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.2, (4.17+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.4, (3.77+j) call vorzeichenbox 1.6, (1.87+j) call vorzeichenbox 1.6, (4.07+j) call vorzeichenbox 1.8, (2.17+j) call vorzeichenbox 1.8, (4.37+j) end if zahl == 6 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1, (3.87+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.2, (4.17+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.4, (3.77+j) call vorzeichenbox 1.6, (1.87+j) call vorzeichenbox 1.6, (4.07+j) call vorzeichenbox 1.8, (2.17+j) call vorzeichenbox 1.8, (4.37+j) call vorzeichenbox 2.0, (1.77+j) call vorzeichenbox 2.0, (3.97+j) end j=j+4 end end if systemart == '1b' then do do i=1 to 12 if zahl == 1 then do call vorzeichenbox 1, (1.87+j) end if zahl == 2 then do call vorzeichenbox 1, (1.87+j) call vorzeichenbox 1.2, (2.17+j) end if zahl == 3 then do call vorzeichenbox 1, (1.87+j) call vorzeichenbox 1.2, (2.17+j) call vorzeichenbox 1.4, (1.77+j) end if zahl == 4 then do call vorzeichenbox 1, (1.87+j) call vorzeichenbox 1.2, (2.17+j) call vorzeichenbox 1.4, (1.77+j) call vorzeichenbox 1.6, (2.07+j) end if zahl == 5 then do call vorzeichenbox 1, (1.87+j) call vorzeichenbox 1.2, (2.17+j) call vorzeichenbox 1.4, (1.77+j) call vorzeichenbox 1.6, (2.07+j) call vorzeichenbox 1.8, (2.37+j) end if zahl == 6 then do call vorzeichenbox 1, (1.87+j) call vorzeichenbox 1.2, (2.17+j) call vorzeichenbox 1.4, (1.77+j) call vorzeichenbox 1.6, (2.07+j) call vorzeichenbox 1.8, (1.37+j) call vorzeichenbox 2.0, (2.97+j) end j=j+2 end end if systemart == '1v' then do do i=1 to 12 if zahl == 1 then do call vorzeichenbox 1, (1.67+j) end if zahl == 2 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1.2, (1.97+j) end if zahl == 3 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.4, (1.57+j) end if zahl == 4 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.6, (1.87+j) end if zahl == 5 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.6, (1.87+j) call vorzeichenbox 1.8, (2.17+j) end if zahl == 6 then do call vorzeichenbox 1, (1.67+j) call vorzeichenbox 1.2, (1.97+j) call vorzeichenbox 1.4, (1.57+j) call vorzeichenbox 1.6, (1.87+j) call vorzeichenbox 1.8, (2.17+j) call vorzeichenbox 2.0, (1.77+j) end j=j+2 end end end otherwise vorzeichen() end takt() end takt: do call ppm_SetFont('(CG)Times') call ppm_SetSize(16) if takt ~= '' then do oben = WORD(takt, 1) unten = WORD(takt, 2) if unten == '' then takt() id = ppm_CreateBox(1.15+(k*0.2), 2, 0.3, 0.6, 0) call ppm_TextIntoBox(id, oben) id = ppm_CreateBox(1.15+(k*0.2), 2.4, 0.3, 0.6, 0) call ppm_TextIntoBox(id, unten) if systemart == '2' then do id = ppm_CreateBox(1.15+(k*0.2), 4, 0.3, 0.6, 0) call ppm_TextIntoBox(id, oben) id = ppm_CreateBox(1.15+(k*0.2), 4.4, 0.3, 0.6, 0) call ppm_TextIntoBox(id, unten) end end else NOP call ppm_SetFont('(CG)Noten') call ppm_SetSize(20) call ppm_UpdateScreen() noteneingabe() end vorzeichenbox: do parse arg bx,by id = ppm_CreateBox(bx, by, 0.35, 0.75, 0) call ppm_TextIntoBox(id, art) return end break_d: break_e: break_c: halt: call exit_msg("User aborted Genie!") exit_msg: procedure do parse arg message if message ~= '' then call ppm_Inform(1,message,) call ppm_ClearStatus() call ppm_AutoUpdate(1) exit end