Changeset 30438 for lang/actionscript

Show
Ignore:
Timestamp:
02/22/09 22:00:52 (3 years ago)
Author:
tekisuke
Message:

相対音量アップ/ダウンを実装。

Location:
lang/actionscript/flmml/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/MML.as

    r29599 r30438  
    1212        protected var m_relativeDir:Boolean; // 
    1313        protected var m_velocity:int;        // default velocity 
     14        protected var m_velDetail:Boolean; 
    1415        protected var m_length:int;          // default length 
    1516        protected var m_tempo:int; 
     
    8889            switch(c) { 
    8990            case 'v': // Volume 
     91                m_velDetail = true; 
    9092                next(); 
    9193                m_velocity = getUInt(m_velocity); 
     
    268270                break; 
    269271            case "v": // Volume 
     272                m_velDetail = false; 
    270273                m_velocity = getUInt((m_velocity-7)/8) * 8 + 7; 
    271274                if (m_velocity < 0)   m_velocity = 0; 
    272275                if (m_velocity > 127) m_velocity = 127; 
     276                break; 
     277            case "(": // vol up 
     278                m_velocity += (m_velDetail) ? 1 : 8; 
     279                if (m_velocity > 127) m_velocity = 127; 
     280                break; 
     281            case ")": // vol down 
     282                m_velocity -= (m_velDetail) ? 1 : 8; 
     283                if (m_velocity < 0) m_velocity = 0; 
    273284                break; 
    274285            case "l": // Length 
     
    666677            m_relativeDir = true; 
    667678            m_velocity = 100; 
     679            m_velDetail = true; 
    668680            m_length = len2tick(4); 
    669681            m_tempo  = 120;