home *** CD-ROM | disk | FTP | other *** search
Wrap
on soundeffect global fcommand, gcast, t1_segcnt, t2_segcnt, t1_idxcnt, t2_idxcnt, AR_nnsc, sel_track, sel_idx, sel_pos, namepause_bs, p1_idx, p1_start, p1_stop, p1_vol, p1_name, p1_cast, p1_time, p2_idx, p2_start, p2_stop, p2_vol, p2_name, p2_cast, p2_time, acmixdest, acwin, cp_idx, eff_idx, eff_vol, eff_lidx set fcommand to EMPTY if sel_track = 0 then alertrd("Select a ELEMENT for effect editing", "Ein ELEMENT fuer Effektbearbeitung auswaehlen.") return 0 else set eff_idx to sel_idx set cp_idx to sel_idx set cps to Ar1sound(mget, eff_idx) if cps = namepause_bs then exit return 0 end if set p1_start to 0 set p1_vol to Ar1Vol(mget, eff_idx) set p1_name to Ar1sound(mget, eff_idx) set p1_stop to value(Ar1time(mget, eff_idx)) set p1_idx to eff_idx set p1_cast to Ar1play(mget, eff_idx) set p1_time to value(Ar1time(mget, eff_idx)) set eff_vol to 16 set eff_lidx to 1 set p2_start to 0 set p2_vol to eff_vol set p2_name to Ar1sound(mget, eff_idx) set p2_stop to value(Ar1time(mget, eff_idx)) set p2_idx to eff_idx set p2_cast to Ar1play(mget, eff_idx) set p2_time to value(Ar1time(mget, eff_idx)) if charToNum(chars(cps, length(cps), length(cps))) < 33 then set tmpsound to chars(cps, 1, length(cps) - 1) else set tmpsound to cps end if cur_busy() effectwindow() setslider(eff_vol) effszklick("SG01") set tmpsprite to getspritenum("EFXHI") set the ink of sprite tmpsprite to 36 sprite_show(tmpsprite, 609, 355) puppetSprite(tmpsprite, 1) cur_on() set acwin to "EFFE" return 1 end if end on eff_init global leff_name, leff_time1, leff_time2 set leff_name to [] set leff_time1 to [] set leff_time2 to [] eff_set(1, "CHORUS I ", 100, 73) eff_set(2, "CHORUS II ", 200, 147) eff_set(3, "CHORUS III ", 300, 295) eff_set(4, "DELAY I 140", 400, 4725) eff_set(5, "DELAY II 130", 500, 5088) eff_set(6, "DELAY III 120", 600, 5512) eff_set(7, "DELAY IV 110", 1000, 6013) eff_set(8, "ECHO I 140", 2000, 9449) eff_set(9, "ECHO II 120", 3000, 11025) end on eff_set idx, name, time1, time2 global leff_name, leff_time1, leff_time2 setAt(leff_name, idx, name) setAt(leff_time1, idx, time1) setAt(leff_time2, idx, time2) end on effect_close global acwin, fcommand, p1_cast, eff_idx, mixedloop, demo if demo then alertrd(" This Demoversion does not support saving effects.", " In dieser Demoversion koennen Effekte nicht gespeichert werden.") else set yesno to selwin("Sound effect." & RETURN & "Do you want to keep the effect ?", "Soll der bearbeitete Effekt." & RETURN & "in den CIRCLE uebernommen werden ?") if yesno then if not mixedloop then mkeffect() end if set dest to get_randfnmx("FX") do_savesegeff(dest) Ar1sound(mput, eff_idx, dest) set sel_size to readsound(dest, p1_cast) Ar1time(mput, eff_idx, sel_size) end if end if circlemaster() set tmpsprite to getspritenum("EFXHI") sprite_blank(tmpsprite) cur_on() set acwin to "MAIN" set fcommand to EMPTY set mixedloop to 0 return 1 end on effszklick lbutton global sel_track, sel_idx, sel_pos, sel_seg, sel_1circ, sel_2circ, mcast, t1_segcnt, t2_segcnt, t1_idxcnt, t2_idxcnt, fcommand, eff_lidx, mixedloop, p2_start set tmpsprite to getspritenum("POINTER") if sel_track = 0 then set the locV of sprite tmpsprite to 1500 exit end if set segsztmp to value(chars(lbutton, 3, 4)) set segszval to segsztmp if segsztmp = 8 then set segsztmp to 7 end if if segsztmp = 9 then set segsztmp to 8 end if if segsztmp = 12 then set segsztmp to 9 end if set eff_lidx to segsztmp set sel_seg to chars(lbutton, 2, 3) set the locV of sprite tmpsprite to 308 - ((9 - segsztmp) * 16) effectwindow() set mixedloop to 0 cur_on() end on effmousedown global mcast, fcommand, scommand, acwin, xy_copy, xy_past, xy_load, xy_save, xy_inse, xy_dele, xy_info, xy_ende, xy_paus, xy_halt, xy_mix, xy_rand, xy_setu, xy_l01, xy_l02, xy_l03, xy_l04, xy_l05, xy_l06, xy_l07, xy_l08, xy_l09, xy_l10, xy_l11, xy_l12, xy_m01, xy_m02, xy_s12, xy_s09, xy_s08, xy_s06, xy_s05, xy_s04, xy_s03, xy_s02, xy_s01, hp_r, hp_l, hp_x, hp_page, player, hp_itm01, hp_itm02, hp_itm03, hp_itm04, hp_itm05, hp_itm06, hp_itm07, hp_itm08, hp_itm09, hp_itm10, hp_itm11, hp_itm12, hp_itm13, ltl_mix if the mouseDown and (acwin = "EFFE") then set x to the mouseH set y to the mouseV set m_point to point(x, y) set mcast to the mouseCast snd_stop() if inside(m_point, xy_ende) then set fcommand to "ENDE" end if if inside(m_point, xy_rand) then set fcommand to "EFFE" end if if inside(m_point, xy_info) then set fcommand to "INFO" end if if inside(m_point, xy_s12) then set fcommand to "SG12" end if if inside(m_point, xy_s09) then set fcommand to "SG09" end if if inside(m_point, xy_s08) then set fcommand to "SG08" end if if inside(m_point, xy_s06) then set fcommand to "SG06" end if if inside(m_point, xy_s05) then set fcommand to "SG05" end if if inside(m_point, xy_s04) then set fcommand to "SG04" end if if inside(m_point, xy_s03) then set fcommand to "SG03" end if if inside(m_point, xy_s02) then set fcommand to "SG02" end if if inside(m_point, xy_s01) then set fcommand to "SG01" end if if not player then if inside(m_point, xy_halt) then set fcommand to "HALT" end if if inside(m_point, rect(1, 450, 50, 479)) then fsel("PATH") end if end if if hp_page = 0 then if inside(m_point, hp_itm01) then help_open(1) end if if inside(m_point, hp_itm02) then help_open(2) end if if inside(m_point, hp_itm03) then help_open(3) end if if inside(m_point, hp_itm04) then help_open(4) end if if inside(m_point, hp_itm05) then help_open(5) end if if inside(m_point, hp_itm06) then help_open(6) end if if inside(m_point, hp_itm07) then help_open(7) end if if inside(m_point, hp_itm08) then help_open(8) end if if inside(m_point, hp_itm09) then help_open(9) end if if inside(m_point, hp_itm10) then help_open(10) end if if inside(m_point, hp_itm11) then help_open(11) end if if inside(m_point, hp_itm12) then help_open(12) end if end if if hp_page > 0 then if inside(m_point, hp_r) then help_R() end if if inside(m_point, hp_l) then help_L() end if if inside(m_point, hp_x) then help_X() end if end if end if if mcast = the number of cast "volume" then set fcommand to "SLID" end if if mcast = the number of cast "title" then set fcommand to "TITL" end if if mcast = the number of cast "sndwin" then set fcommand to "MSTR" end if if mcast = the number of cast "lop" then set fcommand to "LPCK" end if if mcast >= the number of cast "10101" then set fcommand to "SEGS" end if put "Effect>" & fcommand if fcommand = "SLID" then effectslider() else if fcommand = "MSTR" then effectplay() else if fcommand = "TITL" then effectplay() else if fcommand = "ENDE" then but_flash("QUIT", 591, 5) circleend() else if fcommand = "SEGS" then circleplay() else if fcommand = "EFFE" then but_flash("EFX", 591, 336) effect_close() else if fcommand = "INFO" then put "efx help" but_flash("HELP", 538 + 18, 5 + 9) help_open(0) end if end if end if end if end if end if end if if chars(fcommand, 1, 2) = "SG" then effszklick(fcommand) end if end on effectslider cname global steps, stepsize, maxsegs, eff_vol, mixedloop set tmpsprite to getspritenum("VOLUME") repeat while the mouseDown set b to the mouseH set mxsteps to 15 set slmax to 609 set slmin to 458 set sllen to slmax - slmin set stepsize to sllen / mxsteps if b >= slmax then set the locH of sprite tmpsprite to slmax set b to slmax else if b <= slmin then set the locH of sprite tmpsprite to slmin set b to slmin else set the locH of sprite tmpsprite to b end if end if updateStage() end repeat set steps to (b - slmin) / stepsize set eff_vol to steps effectwindow() set mixedloop to 0 end on effectwindow global cp_idx, eff_vol, eff_lidx, leff_name put "EFFECT" into field "title" put Ar1sound(mget, cp_idx) & RETURN & RETURN & "EFFECT : " & getAt(leff_name, eff_lidx) & RETURN & RETURN & "VOLUME : " & lzero(eff_vol) & RETURN into field "sndwin" end on mkeffect global p1_idx, p1_start, p1_stop, p1_vol, p1_name, p1_cast, p1_time, p2_idx, p2_start, p2_stop, p2_vol, p2_name, p2_cast, p2_time, eff_vol, eff_idx, eff_time, leff_time2, eff_lidx, acmixdest, mixedloop cur_busy() set sp to getspritenum("MIX") set the castNum of sprite sp to the number of cast "MIX_DO" set the ink of sprite sp to 8 sprite_show(sp, 282, 199) updateStage() set p2_vol to eff_vol set eff_time to getAt(leff_time2, eff_lidx) set p1_start to 0 set p2_start to value(Ar1time(mget, eff_idx)) - eff_time set p1_stop to eff_time set p2_stop to value(Ar1time(mget, eff_idx)) set acmixdest to 0 mixit(0) set p1_start to eff_time set p2_start to 0 set p1_stop to value(Ar1time(mget, eff_idx)) set p2_stop to value(Ar1time(mget, eff_idx)) - eff_time set acmixdest to eff_time mixit(0) set mixedloop to 1 set sp to getspritenum("MIX") set the castNum of sprite sp to the number of cast "MIX" set the ink of sprite sp to 8 sprite_show(sp, 282, 199) cur_on() end on midi_done global mix_err, mix_vol1, mix_vol2, sndobj, up_mdicha if the machineType = 256 then if up_mdicha >= 0 then set mix_err to sndobj(mMidiDone) if mix_err <> 0 then alert("SNDWORK Error while MIDIDone: " & mix_err) end if end if end if end on midi_init global mix_err, mix_vol1, mix_vol2, sndobj, up_mdicha if the machineType = 256 then set mix_vol1 to string(up_mdicha) set mix_vol2 to string(65535) set mix_err to sndobj(mmidiinit) if mix_err <> 0 then alert("SNDWORK Error while MIDIInit: " & mix_err) end if end if end on midi_active global mix_err, mix_vol1, mix_vol2, mix_idx, sndobj, mix_qua, mix_size, mix_mon, mix_rate, t1_idxcnt, t2_idxcnt, sel_idx, sel_track, up_mdicha, up_mdinot, last_mdinote set mididbg to 0 if the machineType = 256 then if up_mdicha >= 0 then set mix_vol1 to string(1) set mdiactive to sndobj(mMidiActive) if mdiactive > 0 then if midflt_cha(mix_rate) then set action to new_note() if action = 1 then midi_play() else if action = 2 then midi_stop() else if mididbg then put "1mix_qua hiw hib >" & mix_qua put "1mix_size hiw lob >" & mix_size put "1mix_mon low hib >" & mix_mon put "1mix_rate low lob >" & integer(mix_rate - 127 - 16) put "1mix_err status >" & mix_err put EMPTY end if end if end if end if repeat while 1 set mdiactive to sndobj(mMidiGet) if mdiactive > 0 then exit repeat end if if midflt_cha(mix_rate) then set action to new_note() if action = 1 then midi_play() next repeat end if if action = 2 then midi_stop() next repeat end if if mididbg then put "2mix_qua hiw hib >" & mix_qua put "2mix_size hiw lob >" & mix_size put "2mix_mon low hib >" & mix_mon put "2mix_rate low lob >" & integer(mix_rate - 127 - 16) put "2mix_err status >" & mix_err put EMPTY end if end if end repeat end if end if end if end on midflt_cha cha global up_mdicha if up_mdicha <> 0 then if integer(cha - 127 - 16) = up_mdicha then return 1 else return 0 end if else if integer(cha - 127 - 16) <= 16 then return 1 else return 0 end if end if end on new_note global mix_qua, mix_size, mix_mon, mix_rate, t1_idxcnt, t2_idxcnt, sel_idx, sel_track, up_mdicha, up_mdinot, last_mdinote if mix_size <> 0 then if last_mdinote = -1 then set last_mdinote to mix_mon set retnn to 1 else set retnn to 0 end if else if last_mdinote = mix_mon then set last_mdinote to -1 set retnn to 2 else set retnn to 0 end if end if return retnn end on midi_play global mix_qua, mix_size, mix_mon, mix_rate, t1_idxcnt, t2_idxcnt, sel_idx, sel_track, up_mdicha, up_mdinot, last_mdinote set chknote to integer(last_mdinote - up_mdinot) if chknote = 0 then circleloopinit() else if (t1_idxcnt + t2_idxcnt) >= chknote then if t1_idxcnt >= chknote then set sel_track to 1 set sel_idx to integer(chknote) circleplay() else set sel_track to 2 set sel_idx to integer(chknote - t1_idxcnt + 12) circleplay() end if end if end if end on midi_stop global mix_qua, mix_size, mix_mon, mix_rate, t1_idxcnt, t2_idxcnt, sel_idx, sel_track, up_mdicha, up_mdinot, last_mdinote set chknote to integer(mix_mon - up_mdinot) if chknote = 0 then circleloopstop() else snd_stop() end if end