| 106 | | next(); |
| 107 | | o = getUInt(o); |
| 108 | | if (getChar() == ',') next(); |
| 109 | | a = getUInt(a); |
| 110 | | if (getChar() == ',') next(); |
| 111 | | d = getUInt(d); |
| 112 | | if (getChar() == ',') next(); |
| 113 | | s = getUInt(s); |
| 114 | | if (getChar() == ',') next(); |
| 115 | | r = getUInt(r); |
| 116 | | //trace("A"+a+",D"+d+",S"+s+",R"+r); |
| 117 | | m_tracks[m_trackNo].recEnvelope(o, a, d, s, r); |
| | 106 | { |
| | 107 | var releasePos:int; |
| | 108 | var t:Vector.<int> = new Vector.<int>(), l:Vector.<int> = new Vector.<int>(); |
| | 109 | next(); |
| | 110 | o = getUInt(o); |
| | 111 | if (getChar() == ',') next(); |
| | 112 | a = getUInt(a); |
| | 113 | releasePos = m_letter; |
| | 114 | while(true){ |
| | 115 | if (getChar() == ',') { |
| | 116 | next(); |
| | 117 | }else{ |
| | 118 | break; |
| | 119 | } |
| | 120 | releasePos = m_letter - 1; |
| | 121 | d = getUInt(d); |
| | 122 | if (getChar() == ',') { |
| | 123 | next(); |
| | 124 | }else{ |
| | 125 | m_letter = releasePos; |
| | 126 | break; |
| | 127 | } |
| | 128 | s = getUInt(s); |
| | 129 | t.push(d); |
| | 130 | l.push(s); |
| | 131 | } |
| | 132 | if(t.length == 0){ |
| | 133 | t.push(d); |
| | 134 | l.push(s); |
| | 135 | } |
| | 136 | if (getChar() == ',') next(); |
| | 137 | r = getUInt(r); |
| | 138 | //trace("A"+a+",D"+d+",S"+s+",R"+r); |
| | 139 | m_tracks[m_trackNo].recEnvelope(o, a, t, l, r); |
| | 140 | } |
| 164 | | var dp:int = 0, wd:int = 0, fm:int = 1, sf:int = 0, rv:int = 1, dl:int = 0, tm:int = 0, cn:int = 0; |
| | 187 | var dp:int = 0, wd:int = 0, fm:int = 1, sf:int = 0, rv:int = 1, dl:int = 0, tm:int = 0, cn:int = 0, sw:int = 0; |
| 542 | | args = m_string.substring(start + macro.id.length + 1, last - 1).split(","); |
| | 569 | var argstr:String = m_string.substring(start + macro.id.length + 1, last - 1); |
| | 570 | var curarg:String = "", quoted:Boolean = false; |
| | 571 | for(var pos:int = 0; pos < argstr.length; pos++){ |
| | 572 | if(!quoted && argstr.charAt(pos) == '"'){ |
| | 573 | quoted = true; |
| | 574 | }else if(quoted && (pos + 1) < argstr.length && argstr.charAt(pos) == '\\' && argstr.charAt(pos + 1) == '"'){ |
| | 575 | curarg += '"'; |
| | 576 | pos++; |
| | 577 | }else if(quoted && argstr.charAt(pos) == '"'){ |
| | 578 | quoted = false; |
| | 579 | }else if(!quoted && argstr.charAt(pos) == ','){ |
| | 580 | args.push(curarg); |
| | 581 | curarg = ""; |
| | 582 | }else{ |
| | 583 | curarg += argstr.charAt(pos); |
| | 584 | } |
| | 585 | } |
| | 586 | args.push(curarg); |
| | 587 | if(quoted){ |
| | 588 | warning(MWarning.UNCLOSED_ARGQUOTE, ""); |
| | 589 | } |
| | 639 | } |
| | 640 | } |
| | 641 | exp = /^#WAV13\s.*$/gm; |
| | 642 | matched = m_string.match(exp); |
| | 643 | if (matched) { |
| | 644 | for(i = 0; i < matched.length; i++) { |
| | 645 | m_string = m_string.replace(exp, ""); |
| | 646 | //trace(matched[i]); |
| | 647 | wav = matched[i].split(" "); |
| | 648 | wavs = ""; |
| | 649 | for(j = 1; j < wav.length; j++) wavs += wav[j]; |
| | 650 | arg = wavs.split(","); |
| | 651 | waveNo = parseInt(arg[0]); |
| | 652 | if (waveNo < 0) waveNo = 0; |
| | 653 | if (waveNo >= MOscWave.MAX_WAVE) waveNo = MOscWave.MAX_WAVE-1; |
| | 654 | //trace(waveNo+":",arg[1].toLowerCase()); |
| | 655 | MOscWave.setWave(waveNo,arg[1].toLowerCase()); |