チェンジセット 874
- コミット日時:
- 2008/07/23 00:56:52 (4 年前)
- ファイル:
-
- as3/sazameki/branches/fp10/bin-debug (追加)
- as3/sazameki/branches/fp10/obj/sazamekiFP10Config.old (追加)
- as3/sazameki/branches/fp10/obj/sazamekiFP10Config.xml (追加)
- as3/sazameki/branches/fp10/sazamekiFP10.as3proj (更新) (2 diffs)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/core/AudioSamples.as (更新) (1 diff)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/Instrument.as (更新) (1 diff)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/NoteRange.as (更新) (1 diff)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/VelocityRange.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/Voice.as (更新) (3 diffs)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/Tenoran.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/TenoranBtn.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/TenoranCtrlBtn.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/TenoranNoteMap.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/TenoranUI.as (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets/btn_off.png (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets/btn_off.swf (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets/btn_on.png (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets/btn_on.swf (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/tenoran/assets/ui.png (追加)
- as3/sazameki/branches/fp10/src/org/sazameki/audio/format/riff/LIST.as (更新) (4 diffs)
- as3/sazameki/branches/fp10/src/samples/TenoranSample.as (追加)
- as3/sazameki/branches/fp10/src/samples/asset/CHH01.WAV (追加)
- as3/sazameki/branches/fp10/src/samples/tenoran (追加)
- as3/sazameki/branches/fp10/src/samples/tenoran/graphic (追加)
- as3/sazameki/branches/fp10/src/samples/tenoran/graphic/btn.fla (追加)
- as3/sazameki/branches/fp10/src/samples/tenoran/graphic/ui.ai (追加)
- as3/sazameki/branches/fp10/src/samples/tenoran/graphic/ui.fla (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/sazameki/branches/fp10/sazamekiFP10.as3proj
r649 r874 46 46 <!-- External Libraries --> 47 47 <externalLibraryPaths> 48 <element path="C:\lib\flex 31728\frameworks\libs\player\10\playerglobal.swc" />48 <element path="C:\lib\flex_sdk_3.1.0.2418\frameworks\libs\player\10\playerglobal.swc" /> 49 49 </externalLibraryPaths> 50 50 <!-- Runtime Shared Libraries --> … … 62 62 <!-- Class files to compile (other referenced classes will automatically be included) --> 63 63 <compileTargets> 64 <compile path="src\samples\ SamplerSample.as" />64 <compile path="src\samples\TenoranSample.as" /> 65 65 </compileTargets> 66 66 <!-- Paths to exclude from the Project Explorer tree --> as3/sazameki/branches/fp10/src/org/sazameki/audio/core/AudioSamples.as
r649 r874 13 13 14 14 private var _setting:AudioSetting; 15 15 //TODO: サンプルがmonoのときは、rightにleftのサンプルの参照を入れておくようにする。 16 16 public function AudioSamples(setting:AudioSetting,length:int=0) 17 17 { as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/Instrument.as
r649 r874 16 16 public var name:String; 17 17 18 public function Instrument(samples:AudioSamples ,loopStartIdx:uint=0,loopEndIdx:uint=0,sampleMIDINoteNum:uint=255,samplePitchFine:Number=0)18 public function Instrument(samples:AudioSamples=null,loopStartIdx:uint=0,loopEndIdx:uint=0,sampleMIDINoteNum:uint=255,samplePitchFine:Number=0) 19 19 { 20 20 _samples = samples; as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/NoteRange.as
r649 r874 29 29 _max = (value < 128)? value : 127; 30 30 } 31 31 public function toString():String 32 { 33 return (_min + "," +_max); 34 } 32 35 } 33 36 as3/sazameki/branches/fp10/src/org/sazameki/audio/engine/MultiSamplePlayer/Voice.as
r649 r874 89 89 var instLeft:Vector.<Number>=_inst.samples.left; 90 90 var instRight:Vector.<Number>=_inst.samples.right; 91 var instLen:int = instLeft.length; 91 92 var prev:Number; 92 93 var next:Number; … … 103 104 //補間する。とりあえずシンプルに線形補間で試してみる。 104 105 prev = instLeft[nearIdx]; 105 if (nearIdx+1 < loopEnd) 106 { 107 next = instLeft[nearIdx + 1]; 106 107 if(loopEnd){ 108 if (nearIdx+1 < loopEnd) 109 { 110 next = instLeft[nearIdx + 1]; 111 }else 112 { 113 next = instLeft[loopStart]; 114 } 108 115 }else 109 116 { 110 next = instLeft[loopStart]; 111 } 112 117 if (nearIdx + 1 < instLen) 118 { 119 next = instLeft[nearIdx + 1]; 120 }else 121 { 122 next = 0; 123 } 124 } 113 125 tmpLeft = (prev + (next - prev) * diff) * _velocity; 114 126 … … 120 132 { 121 133 prev = instRight[nearIdx]; 122 if ( nearIdx <loopEnd)134 if (loopEnd) 123 135 { 124 next = instRight[nearIdx + 1]; 136 if (nearIdx < loopEnd) 137 { 138 next = instRight[nearIdx + 1]; 139 }else 140 { 141 next = instRight[loopStart]; 142 } 125 143 }else 126 144 { 127 next = instRight[loopStart]; 145 if (nearIdx + 1 < instLen) 146 { 147 next = instLeft[nearIdx + 1]; 148 }else 149 { 150 next = 0; 151 } 128 152 } 129 153 bufRight[i] += (prev+(next-prev) * diff)*_velocity; as3/sazameki/branches/fp10/src/org/sazameki/audio/format/riff/LIST.as
r649 r874 2 2 { 3 3 import flash.utils.ByteArray; 4 import org.sazameki.audio.processor.utility.LengthChanger;5 4 6 5 /** … … 60 59 61 60 var obj:Object = new Object(); 62 var total:int;63 61 var current:int; 64 62 var currentName:String; … … 66 64 bytes.position = 0; 67 65 bytes.endian = ENDIAN; 68 bytes.readUTFBytes(4);//id 69 total = bytes.readInt(); 70 bytes.readUTFBytes(4);//type 71 66 //'RIFF'のときはとばす 67 if (bytes.readUTFBytes(4) == 'RIFF') 68 { 69 bytes.readInt(); 70 bytes.readUTFBytes(4);//type 71 }else 72 { 73 //戻す。 74 bytes.position = 0; 75 } 72 76 //チャンク抜き出し 73 77 while (bytes.position < bytes.length) 74 78 { 75 79 currentName = bytes.readUTFBytes(4); 80 81 76 82 current = bytes.readInt(); 83 84 if (currentName == 'LIST') 85 { 86 currentName = bytes.readUTFBytes(4); 87 current -= 4; 88 } 77 89 78 90 var tmpByte:ByteArray = new ByteArray(); 79 91 80 81 92 bytes.readBytes(tmpByte, 0, current); 82 93 //currentが奇数の時は1バイト余分に取る … … 86 97 } 87 98 88 99 //trace(currentName); 89 100 obj[currentName] = tmpByte; 90 101

