Changeset 18868 for lang/actionscript
- Timestamp:
- 09/05/08 02:16:34 (4 months ago)
- Location:
- lang/actionscript/flmml/trunk/src
- Files:
-
- 2 modified
-
com/txt_nifty/sketch/flmml/MML.as (modified) (6 diffs)
-
flmml.swf (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/MML.as
r15293 r18868 19 19 protected var m_maxGate:int; 20 20 protected var m_form:int; 21 protected var m_noteShift:int; 21 22 protected var m_warning:String; 22 23 … … 53 54 protected function note(noteNo:int):void { 54 55 //trace("note"+noteNo); 55 noteNo += getKeySig();56 noteNo += m_noteShift + getKeySig(); 56 57 var len:int; 57 58 len = getUInt(0); … … 195 196 protected function firstLetter():void { 196 197 var c:String = getCharNext(); 198 var c0:String; 197 199 var i:int; 198 200 switch(c) { … … 205 207 case "b": note(11); break; 206 208 case "r": rest(); break; 207 case "o": 209 case "o": // Octave 208 210 m_octave = getUInt(m_octave); 209 211 if (m_octave < -2) m_octave = -2; 210 212 if (m_octave > 8) m_octave = 8; 211 213 break; 212 case "v": 214 case "v": // Volume 213 215 m_velocity = getUInt((m_velocity-7)/8) * 8 + 7; 214 216 if (m_velocity < 0) m_velocity = 0; 215 217 if (m_velocity > 127) m_velocity = 127; 216 218 break; 217 case "l": 219 case "l": // Length 218 220 m_length = len2tick(getUInt(0)); 219 221 m_length = getDot(m_length); 220 222 break; 221 case "t": 223 case "t": // Tempo 222 224 m_tempo = getUInt(m_tempo); 223 225 if (m_tempo == 0) m_tempo = 1; 224 226 m_tracks[MTrack.TEMPO_TRACK].recTempo(m_tracks[m_trackNo].getRecGlobalTick(), m_tempo); 225 227 break; 226 case "q": 228 case "q": // gate time (rate) 227 229 m_gate = getUInt(m_gate); 228 230 m_tracks[m_trackNo].recGate(m_gate / m_maxGate); 229 231 break; 230 case "<" : 232 case "<" : // octave shift 231 233 if (m_relativeDir) m_octave++; else m_octave--; 232 234 break; 233 case ">": 235 case ">": // octave shift 234 236 if (m_relativeDir) m_octave--; else m_octave++; 235 237 break; 236 case ';': 237 //trace("nexttrack"); 238 case ";": // end of track 238 239 if (m_tracks[m_trackNo].getNumEvents() > 0) { 239 240 m_tracks[++m_trackNo] = createTrack(); 240 241 } 241 242 break; 242 case '@':243 case "@": 243 244 atmark(); 244 245 break; 245 case 'x':246 case "x": 246 247 m_tracks[m_trackNo].recVolMode(getUInt(1)); 248 break; 249 case "n": 250 c0 = getChar(); 251 if (c0 == "s") { // Note Shift 252 next(); 253 m_noteShift = getSInt(m_noteShift); 254 } 255 else 256 warning(MWarning.UNKNOWN_COMMAND, c + c0); 247 257 break; 248 258 default: … … 328 338 m_octave = 4; 329 339 m_velocity = 100; 340 m_noteShift = 0; 330 341 return new MTrack(); 331 342 } … … 576 587 m_maxGate = 16; 577 588 m_form = MOscillator.PULSE; 589 m_noteShift = 0; 578 590 579 591 processComment(str);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)