サンプル13(ルートを小節内でチェンジ)

Playing Bar 1 2 3 4 5 6 7 8
Drum Ptn.Nmb
Root Note1
Root Note2
Rt.Chg.Timing
 
 
 


3

4

6

7

8

0

-




 W




 E




 R




 T




 Y




 U




 I




 O




 P




 @

S

D

G

H

J

L

;




 Z




 X




 C




 V




 B




 N




 M




 ,




 .




 /

 
 
 

サンプル12に追加したソース

<body>

<form>
<tr align=center>
<td class=p10>Root Note2</td><td><select></select></td><td><select></select></td>
<td><select></select></td><td><select></select></td><td><select></select></td>
<td><select></select></td><td><select></select></td><td><select></select></td>
</tr>
</form>
<form>
<tr align=center>
<td class=p10>Rt.Chg.Timing</td>
<td><input type=number min=0 max=15 value=8 class=keta2></td>
	(中略)
<td><input type=number min=0 max=15 value=8 class=keta2></td>
</tr>
</form>

<script><!--

var cht;

function tick(){
	if(playing==2){
		document.forms[0].elements[currbar-1].checked=true;
		currdrptnb=document.forms[1].elements[currbar-1].value;
		cht=document.forms[4].elements[currbar-1].value;

		if(count==0){
			Jazz.MidiOut(0x81,cbn+36,0);
			cbn=document.forms[2].elements[currbar-1].selectedIndex;
			Jazz.MidiOut(0x91,cbn+36,127);
		}else{
			if(count==cht){
				kcbn=document.forms[3].elements[currbar-1].selectedIndex;
				if(kcbn!=17){
					Jazz.MidiOut(0x81,cbn+36,0);
					cbn=document.forms[3].elements[currbar-1].selectedIndex;
					if(cbn!=17)Jazz.MidiOut(0x91,cbn+36,127);
				}
			}
		}		
	}
	if(playing==1){
		currdrptnb=select_drpt.selectedIndex;
	}
	for(j=0;j<6;j++){
		din=drar[currdrptnb][count][j][0];
		dvl=drar[currdrptnb][count][j][1];
		Jazz.MidiOut(0x99,din,dvl);
	}
	count++;
	if(count>=(beat*4)){
		count=0;
		if(playing==2){
			currbar++;
			if(currbar>8)currbar=1;
			currdrptnb=document.forms[1].elements[currbar-1].value;
			select_drpt.selectedIndex=currdrptnb;
			drartoscr();
		}
	}	
	timeout=setTimeout(tick,interval);
}

var karir=[0,4,4,0,7,11,12,5,2,7,2,5,9,17,4,7];   //ルート進行サンプル

for(k=0;k<8;k++){
	bx=document.forms[2].elements[k];
	for(i=0;i<17;i++){
		bx[i]=new Option(bns[i],i,i==karir[k],i==karir[k]);
	}
}
for(k=0;k<8;k++){
	bx=document.forms[3].elements[k];
	for(var i in bns){
		bx[i]=new Option(bns[i],i,i==karir[k+8],i==karir[k+8]);
	}
}

--></script>