Changeset 28310 for lang/actionscript/flmml/trunk/src
- Timestamp:
- 01/12/09 14:13:22 (4 years ago)
- Location:
- lang/actionscript/flmml/trunk/src
- Files:
-
- 1 added
- 4 modified
-
com/txt_nifty/sketch/flmml/MEnvelope.as (modified) (6 diffs)
-
com/txt_nifty/sketch/flmml/MOscGbWave.as (added)
-
com/txt_nifty/sketch/flmml/MOscSaw.as (modified) (1 diff)
-
com/txt_nifty/sketch/flmml/MOscillator.as (modified) (3 diffs)
-
flmml.swf (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/MEnvelope.as
r28292 r28310 84 84 } 85 85 else { 86 m_currentVal = m_currentVal -m_releaseStep; //release phase86 m_currentVal -= m_releaseStep; //release phase 87 87 } 88 88 if (m_currentVal <= 0) { … … 110 110 } 111 111 else { 112 m_currentVal = m_currentVal -m_releaseStep; //release phase112 m_currentVal -= m_releaseStep; //release phase 113 113 } 114 114 if (m_currentVal <= 0) { … … 117 117 } 118 118 ++m_timeInSamples; 119 samples[i] = samples[i] *m_currentVal * velocity;119 samples[i] *= m_currentVal * velocity; 120 120 } 121 121 } … … 123 123 var i:int; 124 124 for(i = start; i < end; i++) { 125 if (!m_playing) { samples[i] = 0 .0; continue; }125 if (!m_playing) { samples[i] = 0; continue; } 126 126 127 127 if (!m_releasing) { … … 137 137 } 138 138 else { 139 m_currentVal = m_currentVal -m_releaseStep; //release phase139 m_currentVal -= m_releaseStep; //release phase 140 140 } 141 141 if (m_currentVal <= 0) { … … 144 144 } 145 145 ++m_timeInSamples; 146 var d:int = m_currentVal * 255.0; 147 samples[i] = samples[i] * s_volumeMap[d] * velocity; 146 samples[i] *= s_volumeMap[(m_currentVal * 255) >> 0] * velocity; 148 147 } 149 148 } -
lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/MOscSaw.as
r27528 r28310 28 28 } 29 29 public override function getNextSampleOfs(ofs:int):Number { 30 var val:Number = s_table[((m_phase + ofs) & PHASE_MSK) >> PHASE_ MSK];30 var val:Number = s_table[((m_phase + ofs) & PHASE_MSK) >> PHASE_SFT]; 31 31 m_phase = (m_phase + m_freqShift) & PHASE_MSK; 32 32 return val; -
lang/actionscript/flmml/trunk/src/com/txt_nifty/sketch/flmml/MOscillator.as
r27840 r28310 13 13 public static const FC_S_NOISE:int = 8; 14 14 public static const FC_DPCM:int = 9; 15 public static const GB_ MEMORY:int= 10;15 public static const GB_WAVE:int = 10; 16 16 public static const GB_NOISE:int = 11; 17 17 public static const GB_S_NOISE:int = 12; … … 35 35 m_osc[FC_S_NOISE] = null; 36 36 m_osc[FC_DPCM] = new MOscMod(); 37 m_osc[GB_ MEMORY] = new MOscMod();37 m_osc[GB_WAVE] = new MOscGbWave(); 38 38 m_osc[GB_NOISE] = new MOscGbLNoise(); 39 39 m_osc[GB_S_NOISE] = new MOscGbSNoise(); … … 50 50 MOscFcTri.boot(); 51 51 MOscFcNoise.boot(); 52 MOscGbWave.boot(); 52 53 MOscGbLNoise.boot(); 53 54 MOscGbSNoise.boot();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)