int feedback_banger(int xvis, int yvis)
{
char over_banger_is[64];
int banger_overoll=0;
for (int nb=0;nb<8;nb++)
{
for (int lb=0;lb<16;lb++)
{
if((nb)+(lb*8)<core_user_define_nb_bangers)
{
ol::Circle BangerFeedback(ol::Vec2D(xvis+(nb*12)+30,yvis+(lb*12)+30),5);
BangerFeedback.DrawOutline(CouleurLigne.WithAlpha(0.5));
if(bang_is_sended[(nb)+(lb*8)]==0 && (((nb)+(lb*8))<127))//évenement pas encore fini dans son éxécution
{
BangerFeedback.Draw(CouleurBlind.WithAlpha(alpha_blinker));
}


if(index_over_A_window==0 && mouse_x>xvis+(nb*12)+25 && mouse_x<xvis+(nb*12)+35 && mouse_y>yvis+(lb*12)+25 && mouse_y<yvis+(lb*12)+35)
{
banger_overoll=(nb)+(lb*8);
if(banger_overoll<127)
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
BangerFeedback.SetLineWidth(2.0);
BangerFeedback.DrawOutline(CouleurBlind);
char desc_midi_bg[24];
sprintf(desc_midi_bg,"Banger %d",banger_overoll+1);
show_type_midi(1343+banger_overoll,desc_midi_bg );
}
else{BangerFeedback.DrawOutline(CouleurLigne);}

}
}
}
}
}

for(int p=0;p<16;p++)
{
sprintf(over_banger_is,"%d",(p*8)+1);
petitpetitchiffrerouge.Print(over_banger_is,xvis,(yvis+p*12)+35);
}

if(banger_overoll<127)
{
sprintf(over_banger_is,"BANGER %d",banger_overoll+1);
petitpetitchiffre.Print(over_banger_is,xvis,yvis+10);

sprintf(over_banger_is, bangers_name[banger_overoll]);
petitpetitchiffre.Print(over_banger_is,xvis,yvis+20);
}
sprintf(over_banger_is,"Last bang sended: %d",last_banger_sended_manually+1);
petitpetitchiffre.Print(over_banger_is,xvis,yvis+230);
 return(0);
}
int ThePlayCommands(int xb, int yb, int num_grider)
{
 play_button_view(xb+10,yb,grider_is_playing[num_grider]);
 seek_button_view(xb+40,yb,0);
 minichiffre.Print(ol::ToString(index_grider_seek_pos[num_grider]+1),xb+65,yb);
 playstop_button_view(xb+70,yb,grider_autostopmode[num_grider]);
 
 if(window_focus_id==W_GRID && mouse_y>yb && mouse_y<yb+20 )
 { 
 if(mouse_x>xb+10 && mouse_x<xb+30 )// PLAY GRID
 {
 char sttmp[24];
 sprintf(sttmp,"Play GridPl.%d",num_grider+1);
 show_type_midi(1492+num_grider,sttmp );
        
 }
 else if(mouse_x>xb+40 && mouse_x<xb+60 )//SEEK GRID
 {
  char sttmp[24];
 sprintf(sttmp,"Seek GridPl.%d",num_grider+1);
 show_type_midi(1496+num_grider,sttmp );
 if(mouse_b&1)
 {
 seek_button_view(xb+40,yb,1);  
 }
 }



else if(mouse_x>xb+70 && mouse_x<xb+90 )//AUTO STOP PLAY GRID
 {
 char sttmp[24];
 sprintf(sttmp,"AutoStop GridPl.%d",num_grider+1);
 show_type_midi(1500+num_grider,sttmp );
 }
}//fin check y
 return(0);   
}
int Grider_Box(int xb, int yb)
{
Rect GriderBack(Vec2D(xb,yb),Vec2D(largeurGrider,hauteurGrider));
GriderBack.SetRoundness(15);
GriderBack.SetLineWidth(triple_epaisseur_ligne_fader);
GriderBack.Draw(CouleurFond); 
if(window_focus_id==926)
{
GriderBack.DrawOutline(CouleurFader); 
}
else
{
GriderBack.DrawOutline(CouleurLigne);    
}  


neuro.Print( "Grid",(xb+90), (yb+15));
neuro.Print( "Players",(xb+90), (yb+35));

//definition debut chan du grider
Rect BackGriderChan(Vec2D(xb+245,yb+15),Vec2D(40,20));
BackGriderChan.SetRoundness(4);
BackGriderChan.Draw(CouleurBleuProcedure.WithAlpha(0.5));
petitchiffre.Print("Beg.Chan.",xb+180,yb+30);
petitchiffre.Print(ol::ToString(grider_begin_channel_is),xb+250,yb+30);

//def number row and cols
Rect BackGriderCol(Vec2D(xb+315,yb+15),Vec2D(30,20));
BackGriderCol.SetRoundness(4);
BackGriderCol.Draw(CouleurBleuProcedure.WithAlpha(0.5));
petitchiffre.Print("Col.:",xb+290,yb+30);
petitchiffre.Print(ol::ToString(grider_nb_col),xb+320,yb+30);

Rect BackGriderRow(Vec2D(xb+385,yb+15),Vec2D(30,20));
BackGriderRow.SetRoundness(4);
BackGriderRow.Draw(CouleurBleuProcedure.WithAlpha(0.5));
petitchiffre.Print("Rows:",xb+347,yb+30);
petitchiffre.Print(ol::ToString(grider_nb_row),xb+390,yb+30);

//////////////EDIT MODE///////////////////////////////
Rect GriderEditEnable( Vec2D((xb+430),(yb+15)),Vec2D(50,20));
GriderEditEnable.SetRoundness(7.5);
if(index_enable_edit_Grider==1)
{
GriderEditEnable.Draw(CouleurFader);                                 
}
GriderEditEnable.DrawOutline(CouleurLigne);
petitchiffre.Print("edit",xb+440 ,yb+27);

/////////////nbre Gridplayers affichage///////////////////////////
petitpetitchiffre.Print("GridPlayers",xb+535,yb+13);
for(int o=0;o<core_user_define_nb_gridplayers;o++)
{
Rect ShowGridB(Vec2D(xb+540+(o*15),yb+20),Vec2D(10,10));  
if(index_show_grid_player[o]==1)
{ShowGridB.Draw(CouleurFader);}      
ShowGridB.DrawOutline(CouleurLigne.WithAlpha(0.7));
if(window_focus_id==W_GRID  && mouse_x>xb+540+(o*15) && mouse_x<xb+540+(o*15)+10 && mouse_y>yb+20 && mouse_y<yb+30)
{
if(Midi_Faders_Affectation_Type!=0)
{
char sttmp[24];
sprintf(sttmp,"View GridPlayer %d",o+1);
show_type_midi(1472+o,sttmp );
ShowGridB.SetLineWidth(2.0);
ShowGridB.DrawOutline(CouleurBlind);
}
}
}

if( window_focus_id==W_GRID  && mouse_y>yb+15 && mouse_y<yb+35)
{
if(mouse_x>xb+245 && mouse_x<xb+285 &&  index_enable_edit_Grider==1)//chan edit
{
BackGriderChan.DrawOutline(CouleurLigne);               
}          
if(mouse_x>xb+315 && mouse_x<xb+355 &&  index_enable_edit_Grider==1)//col edit
{
BackGriderCol.DrawOutline(CouleurLigne);      
} 
if(mouse_x>xb+385 && mouse_x<xb+425 &&  index_enable_edit_Grider==1)//rows edit
{
BackGriderRow.DrawOutline(CouleurLigne);      
}    
}




//Global grid viewer
petitpetitchiffre.Print("View",xb+495,yb+13);
Rect AllowGridViewerB(Vec2D(xb+495,yb+20),Vec2D(40,10));
AllowGridViewerB.Draw(CouleurFader.WithAlpha(show_global_view_grider));
AllowGridViewerB.DrawOutline(CouleurLigne);

if( window_focus_id==W_GRID && mouse_b&1 && mouse_released==0)
{
if(mouse_x>xb+495 && mouse_x<xb+535 && mouse_y>yb+20 && mouse_y<yb+30)
{
show_global_view_grider=toggle(show_global_view_grider);  
refresh_hauteur_fenetre_grider();
mouse_released=1;                
}
}

 
if(show_global_view_grider==1)
 {GlobalGridViewer(xb,yb+40); }
  
 //AFFICHAGE DES GRID PLAYERS    
int numerodeplayer_affiche=0;
for(int yo=0;yo<core_user_define_nb_gridplayers;yo++)
{
if(index_show_grid_player[yo]==1)
{
Grid_player(xb, yb+50+hauteurGlobalGridviewer+(numerodeplayer_affiche*(60+(grider_facteur_hauteur*size_grille))), yo); 
numerodeplayer_affiche++;
}
}

return(0);     
}
int TheCallGridBox(int xb, int yb, int num_grider)
{
Rect GriderNum(Vec2D(xb+10,yb),Vec2D(50,20));
GriderNum.SetRoundness(5);
GriderNum.DrawOutline(CouleurLigne.WithAlpha(0.5)); 
neuromoyen.Print(ol::ToString(index_grider_selected[num_grider]+1),(xb+20), (yb+15));

if(mouse_x>xb+10 && mouse_x<xb+60 && mouse_y>yb && mouse_y<yb+20 
&& window_focus_id==W_GRID  )
{
GriderNum.DrawOutline(CouleurLigne);
if(Midi_Faders_Affectation_Type!=0)
{
GriderNum.DrawOutline(CouleurBlind);
char sttmp[24];
sprintf(sttmp,"CallGrid in GridPl.%d",num_grider+1);
show_type_midi(1524+num_grider,sttmp );
}
}

Rect GiveNameOfGrider(Vec2D(xb+70,yb), Vec2D( 170,20));
GiveNameOfGrider.SetRoundness(7.5);
GiveNameOfGrider.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print( grider_name[index_grider_selected[num_grider]],(xb+75), (yb+15));
if(  window_focus_id==W_GRID && mouse_x>xb+70 && mouse_x<xb+250 && mouse_y>yb && mouse_y<yb+20 && index_type==1 )
{
GiveNameOfGrider.DrawOutline(CouleurLigne);         
}

//UP DOWN griders number selected
Circle GriderPlus(Vec2D(xb+295,yb+10),12);
Circle GriderMinus(Vec2D(xb+265,yb+10),12);

petitchiffre.Print("-",xb+260,yb+13);
petitchiffre.Print("+",xb+290,yb+13);
GriderPlus.DrawOutline(CouleurLigne);
GriderMinus.DrawOutline(CouleurLigne);

if( window_focus_id==W_GRID )
{
    
if(mouse_x>xb+253 && mouse_x<xb+277 && mouse_y>yb-2 && mouse_y<yb+22)
{
if(Midi_Faders_Affectation_Type!=0)
{
char sttmp[24];
sprintf(sttmp,"Minus Grid in GridPl.%d",num_grider+1);
show_type_midi(1476+num_grider,sttmp );
GriderMinus.DrawOutline(CouleurBlind);
}
}

if( mouse_x>xb+283 && mouse_x<xb+307 && mouse_y>yb-2 && mouse_y<yb+22)
{
if( Midi_Faders_Affectation_Type!=0)
{
char sttmp[24];
sprintf(sttmp,"Plus Grid in GridPl.%d",num_grider+1);
show_type_midi(1480+num_grider,sttmp );
GriderPlus.DrawOutline(CouleurBlind);
}
}
}
return(0);   
}
int TheStepBox(int xb,int yb, int num_grid_player)
{

//STEP IS
previous_button_view(xb,yb,0);
Rect StepB(Vec2D(xb+22,yb-5),Vec2D(35,30));
StepB.SetRoundness(4);
StepB.DrawOutline(CouleurLigne.WithAlpha(0.4));
Rect Step127(Vec2D(xb+60,yb-6),Vec2D(20,5));
Step127.SetRoundness(1.0);                  
Step127.DrawOutline(CouleurLigne.WithAlpha(0.4));
minichiffre.Print(ol::ToString(grid_midi_multiple_for_step_call[num_grid_player]),xb+82,yb);

next_button_view(xb+60,yb,0);
if(window_focus_id==926 )
{
 //Step minus
if(window_focus_id==W_GRID &&  mouse_x>xb & mouse_x<xb+20 && mouse_y>yb && mouse_y<yb+20 )   
{
 if(Midi_Faders_Affectation_Type!=0)
{
char sttmp[24];
sprintf(sttmp,"StepMinus in GridPl.%d",num_grid_player+1);
show_type_midi(1484+num_grid_player,sttmp );
Rect StepMinus(Vec2D(xb,yb),Vec2D(20,20));
StepMinus.SetRoundness(4);
StepMinus.DrawOutline(CouleurBlind);
}
if(mouse_b&1 )
{  
  previous_button_view(xb,yb,1);
} 
}     
//Step plus
if(window_focus_id==W_GRID && mouse_x>xb+60 & mouse_x<xb+80 && mouse_y>yb && mouse_y<yb+20 )   
{
if(Midi_Faders_Affectation_Type!=0)
{
char sttmp[24];
sprintf(sttmp,"StepPlus in GridPl.%d",num_grid_player+1);
show_type_midi(1488+num_grid_player,sttmp );
Rect StepPlus(Vec2D(xb+60,yb),Vec2D(20,20));
StepPlus.SetRoundness(4);
StepPlus.DrawOutline(CouleurBlind);
}
if(mouse_b&1 )
{
  next_button_view(xb+60,yb,1);
}  
}            

//set +127 box pour les pas             
if(window_focus_id==W_GRID && mouse_x>xb+60 && mouse_x<xb+80 && mouse_y>yb-6 && mouse_y<yb-1)
{
Step127.DrawOutline(CouleurLigne);
if( Midi_Faders_Affectation_Type!=0)
 {
 Step127.DrawOutline(CouleurBlind);
 char sttmp[24];
 sprintf(sttmp,"CallStep x7 GridPl.%d",num_grid_player+1);
 show_type_midi(1536+num_grid_player,sttmp );
 }
}
//chargement d'un pas, ou affectation d'un temps ou clear  du pas          
if(window_focus_id==W_GRID && mouse_x>xb+22 & mouse_x<xb+57 && mouse_y>yb-5 && mouse_y<yb-25 )   
{
StepB.DrawOutline(CouleurLigne); 
if( Midi_Faders_Affectation_Type!=0)
 {
 StepB.DrawOutline(CouleurBlind);
 char sttmp[24];
 sprintf(sttmp,"CallStep x1 GridPl.%d",num_grid_player+1);
 show_type_midi(1532+num_grid_player,sttmp );
 }
}
}    
petitchiffre.Print(ol::ToString(index_grider_step_is[num_grid_player]+1),xb+27,yb+14);
 
 return(0);   
}
int TheGrid_divers( int xb, int yb, int num_grid_player)
{
 Rect AffectToDocB(Vec2D(xb+60,yb),Vec2D(50,30));  
 AffectToDocB.SetRoundness(5);
 AffectToDocB.SetLineWidth(tiers_epaisseur_ligne_fader); 
 if(num_grid_player==gridplayer_to_affect_is)
 { AffectToDocB.Draw(CouleurFader);}
 AffectToDocB.DrawOutline(CouleurLigne.WithAlpha(0.3));
 
 petitpetitchiffre.Print("Affect",xb+65,yb+12);
 petitpetitchiffre.Print("ToDock",xb+65,yb+22);

 
  ////////EDITING MODE/////////////////////////

 Rect ToStepMB(Vec2D(xb,yb+45),Vec2D(10,10));
 ToStepMB.Draw(CouleurBlind.WithAlpha(alpha_blinker*to_step_editing_mode[num_grid_player]));
 ToStepMB.DrawOutline(CouleurLigne.WithAlpha(0.5));
 petitpetitchiffre.Print("ToStep",xb+15,yb+48);
 petitpetitchiffre.Print(" Mode",xb+15,yb+58);
 minichiffre.Print("Step",xb+65,yb+40);
 Rect StepToB(Vec2D(xb+60,yb+45),Vec2D(40,15));
 StepToB.SetRoundness(0.5);
 StepToB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 petitpetitchiffre.Print(ol::ToString(index_StepTo[num_grid_player]+1),xb+65,yb+55);
 
 
 ///////////COPY TO ////////////////////////////////////////////////////////////
 Line(Vec2D(xb,yb+68),Vec2D(xb+110,yb+68)).Draw(CouleurLigne.WithAlpha(0.5));
 
 
 
 Rect CopyB(Vec2D(xb,yb+75),Vec2D(50,15));
 CopyB.SetRoundness(4.0);
 CopyB.Draw(CouleurSurvol.WithAlpha(0.5));
 
 petitpetitchiffre.Print("CopyTo",xb+5,yb+85);
 
 Rect InsB(Vec2D(xb+55,yb+75),Vec2D(50,15));
 InsB.SetRoundness(4.0);
 InsB.Draw(CouleurSurvol.WithAlpha(0.5));
 petitpetitchiffre.Print("Insert",xb+60,yb+85);
 
 
 Rect GridCopyB(Vec2D(xb,yb+95),Vec2D(30,15));
 GridCopyB.SetRoundness(0.5);
 GridCopyB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 Rect StepCopyB(Vec2D(xb+45,yb+95),Vec2D(40,15));
 StepCopyB.SetRoundness(0.5);
 StepCopyB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 petitpetitchiffre.Print(ol::ToString( index_Grid_copyto[num_grid_player][0]+1),xb+5,yb+105);
 petitpetitchiffre.Print(ol::ToString( index_Grid_copyto[num_grid_player][1]+1),xb+50,yb+105);



 

 if(window_focus_id==W_GRID && index_enable_edit_Grider==1 )
 {
 //to step mode
 if( mouse_x>xb && mouse_x<xb+100 && mouse_y>yb+45 && mouse_y<yb+55)
 {
 ToStepMB.DrawOutline(CouleurLigne);     
 }
 //tostep
 if( mouse_x>xb+60 && mouse_x<xb+100 && mouse_y>yb+45 && mouse_y<yb+60)
 {
 StepToB.DrawOutline(CouleurLigne);                    
 }
 //copy mode                        
 if(mouse_x>xb && mouse_x<xb+50 && mouse_y>yb+75 && mouse_y<yb+90 )
 {
  CopyB.DrawOutline(CouleurFader);             
 } 
 //insert mode                        
 if(mouse_x>xb+55 && mouse_x<xb+105 && mouse_y>yb+75 && mouse_y<yb+90 )
 {
  InsB.DrawOutline(CouleurFader);             
 } 
 //grid   entry                     
 if(mouse_x>xb && mouse_x<xb+30 && mouse_y>yb+95 && mouse_y<yb+105 )
 {
 GridCopyB.DrawOutline(CouleurLigne);         
 } 
 //step entry                      
 if(mouse_x>xb+45 && mouse_x<xb+85 && mouse_y>yb+95 && mouse_y<yb+105 )
 {
 StepCopyB.DrawOutline(CouleurLigne);
 }                         
 }
  char sttmp[24];

if(num_grid_player==0 )
{
Rect BoxLink(Vec2D(xb, yb+115),Vec2D(105,15));
BoxLink.Draw(CouleurFader.WithAlpha(index_link_speed_crossfade_to_gpl1));
BoxLink.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print("Speed is CueList",xb+2,yb+125);
if(window_focus_id==W_GRID && mouse_x>xb && mouse_x<xb+105 && mouse_y>yb+115 && mouse_y<yb+130)
 {
 if( Midi_Faders_Affectation_Type!=0)
 {

 sprintf(sttmp,"Speed is CueList GPl.1");
 show_type_midi(1540,sttmp );
 BoxLink.DrawOutline(CouleurBlind);
 }

 }
}

Rect GetDraw(Vec2D(xb, yb+135),Vec2D(105,15));
GetDraw.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print("Snap Fader",xb+7,yb+145);
neuromoyen.Print(ol::ToString(GplSnapFader[num_grid_player]+1),xb+80,yb+146);


 if(window_focus_id==W_GRID && index_enable_edit_Grider==1 )
 {
 //to step mode
 if( mouse_x>xb && mouse_x<xb+105 && mouse_y>yb+135 && mouse_y<yb+150)
 {
 GetDraw.DrawOutline(CouleurLigne);     
 }
 }
return(0);   
}
int TheGrid_commands ( int xb, int yb, int num_grid_player)
{

//affichage progression transfert
 Rect BackSt(Vec2D(xb,yb-5),Vec2D(63,10));
 Rect BackPreset(Vec2D(xb,yb+10),Vec2D(63,10));
 BackSt.DrawOutline(CouleurLigne.WithAlpha(0.2));
 BackPreset.DrawOutline(CouleurLigne.WithAlpha(0.2));
 Rect ActStage(Vec2D(xb,yb-5),Vec2D(grid_niveauX1[num_grid_player]/4,10));
 ActStage.Draw(CouleurNiveau.WithAlpha(0.7));
 ActStage.Draw(CouleurLigne.WithAlpha(0.5));
 Rect ActPreset(Vec2D(xb,yb+10),Vec2D(grid_niveauX2[num_grid_player]/4,10));
 ActPreset.Draw(CouleurSurvol);
 ActPreset.Draw(CouleurLigne.WithAlpha(0.5));
if(grider_is_playing[num_grid_player]==1)
{
if(actual_time<(grid_crossfade_start_time[num_grid_player]+grid_delay_out[num_grid_player]))
{
BackSt.Draw(CouleurBlind.WithAlpha(alpha_blinker));                                                                            
}
if(actual_time<(grid_crossfade_start_time[num_grid_player]+grid_delay_in[num_grid_player]))
{
BackPreset.Draw(CouleurBlind.WithAlpha(alpha_blinker)); 
}
}
 //accélérometer du player
 Rect AcelGrid(Vec2D(xb,yb+30),Vec2D(127,10));
 AcelGrid.DrawOutline(CouleurLigne.WithAlpha(0.5));
 Rect AccelB(Vec2D(xb+grid_crossfade_speed[num_grid_player]-5,yb+30),Vec2D(10,10));
 AccelB.SetRoundness(2.0);
 AccelB.Draw(CouleurFader);
 Line(Vec2D(xb+64,yb+25),Vec2D(xb+64,yb+45)).DrawOutline(CouleurLigne);
 minichiffre.Print(ol::ToString(grid_crossfade_speed[num_grid_player]),xb+130,yb+35);
if(window_focus_id==W_GRID)
{
 if(mouse_x>xb-5 && mouse_x<xb+127+5 && mouse_y>=yb+30 && mouse_y<=yb+40 )
 {
  AcelGrid.DrawOutline(CouleurLigne);                  
 if( Midi_Faders_Affectation_Type!=0)
 {
char sttmp[24];
sprintf(sttmp,"Speed GridPl.%d",num_grid_player+1);
show_type_midi(1508+num_grid_player,sttmp );
AcelGrid.DrawOutline(CouleurBlind);
 }
 }
}
 petitpetitchiffre.Print(string_time_in_grider[num_grid_player],xb+70,yb+1);
 petitpetitchiffrerouge.Print(string_time_in_grider_next_step[num_grid_player],xb+70,yb+12);
//next step
 petitpetitchiffrerouge.Print(string_next_step_to[num_grid_player],xb+70,yb+25);

 ////////////////SLAVE MODE////////////////////////////////////////////////////
 
 Rect SlaveB(Vec2D(xb+150,yb+25),Vec2D(40,15));
 SlaveB.SetRoundness(0.5);

if(window_focus_id==W_GRID )
{ 
if(mouse_x>xb+150 && mouse_x<xb+150+40 && mouse_y>yb+25 && mouse_y<yb+40)
{
 SlaveB.DrawOutline(CouleurLigne);                  
 if( Midi_Faders_Affectation_Type!=0)
 {
char sttmp[24];
sprintf(sttmp,"Slave in GridPl.%d",num_grid_player+1);
show_type_midi(1504+num_grid_player,sttmp );
SlaveB.DrawOutline(CouleurBlind);
 }
} 
}
 
 SlaveB.Draw(CouleurFader.WithAlpha(grid_player_slave[num_grid_player]));
 SlaveB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 petitpetitchiffre.Print("Slave",xb+155,yb+35);
 
 /////////////////MODES ET DEFINE AU STEP
 Rect CadreStep(Vec2D(xb+15,yb+50),Vec2D(180,100));
 CadreStep.SetRoundness(5.0);
 CadreStep.Draw(CouleurLigne.WithAlpha(0.1));   
 
 petitpetitchiffre.Print("Step Macros",xb+20, yb+60);   
 petitpetitchiffre.Print("Grid",xb+110,yb+60);
 petitpetitchiffre.Print("Step",xb+155,yb+60);
 Rect GridGotoB(Vec2D(xb+105,yb+70),Vec2D(30,15));
 GridGotoB.SetRoundness(0.5);
 GridGotoB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 Rect StepGotoB(Vec2D(xb+150,yb+70),Vec2D(40,15));
 StepGotoB.SetRoundness(0.5);
 StepGotoB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 Rect CountB(Vec2D(xb+150,yb+90),Vec2D(40,15));
 CountB.SetRoundness(0.5);
 CountB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 Rect StepSeekB(Vec2D(xb+150,yb+110),Vec2D(40,15));
 StepSeekB.SetRoundness(0.5);
 StepSeekB.DrawOutline(CouleurLigne.WithAlpha(0.2));
 
 Rect StopPlayB(Vec2D(xb+100,yb+130),Vec2D(90,15));
 StopPlayB.SetRoundness(0.5); 

 char sttmp[24];
 
 for(int sp=0;sp<4;sp++)
 {
 Rect OnOffSp(Vec2D(xb,yb+70+(sp*20)),Vec2D(10,10));
 OnOffSp.SetRoundness(0.2);
 switch(sp)
 {
 case 0:
 OnOffSp.Draw(CouleurBlind.WithAlpha(grider_goto_mode[num_grid_player]));
 petitpetitchiffre.Print("GoTo",xb+20, yb+80+(sp*20));
 sprintf(sttmp,"GotoMode GridPl.%d",num_grid_player+1);
 petitpetitchiffre.Print(ol::ToString(grid_goto[index_grider_selected[num_grid_player]][index_grider_step_is[num_grid_player]][0]+1),xb+110,yb+80+(sp*20));
 petitpetitchiffre.Print(ol::ToString(grid_goto[index_grider_selected[num_grid_player]][index_grider_step_is[num_grid_player]][1]+1),xb+155,yb+80+(sp*20));
 break;
 case 1:
 OnOffSp.Draw(CouleurBlind.WithAlpha(grider_count_mode[num_grid_player]));
 petitpetitchiffre.Print("Count",xb+20, yb+80+(sp*20));
 sprintf(sttmp,"CountMode GridPl.%d",num_grid_player+1);
 petitpetitchiffre.Print(string_grid_count[num_grid_player],xb+55, yb+80+(sp*20));
 petitpetitchiffre.Print(ol::ToString(grid_count[index_grider_selected[num_grid_player]][index_grider_step_is[num_grid_player]]),xb+155,yb+80+(sp*20));
 break;
 case 2:
 OnOffSp.Draw(CouleurBlind.WithAlpha(grider_seekto_mode[num_grid_player]));
 petitpetitchiffre.Print("SeekStep",xb+20, yb+80+(sp*20));       
 sprintf(sttmp,"SeekStepMode GridPl.%d",num_grid_player+1);
 petitpetitchiffre.Print(ol::ToString(grid_seekpos[index_grider_selected[num_grid_player]][index_grider_step_is[num_grid_player]]+1),xb+155,yb+80+(sp*20)); 
 break;
 case 3:
 OnOffSp.Draw(CouleurBlind.WithAlpha(grider_stoplay_mode[num_grid_player]));
 petitpetitchiffre.Print("StopPlay",xb+20, yb+80+(sp*20));
 sprintf(sttmp,"StopPlayMode GridPl.%d",num_grid_player+1);
 StopPlayB.Draw(CouleurBlind.WithAlpha(grid_stoplay[index_grider_selected[num_grid_player]][index_grider_step_is[num_grid_player]]));    
 StopPlayB.DrawOutline(CouleurLigne.WithAlpha(0.5));
 break;
 default:
 break;          
 }

 OnOffSp.DrawOutline(CouleurLigne.WithAlpha(0.5));
  
 if((window_focus_id==W_GRID || (num_grid_player==0 && window_focus_id==909)) && mouse_x>xb && mouse_x<xb+10 && mouse_y>yb+70+(sp*20) && mouse_y<yb+80+(sp*20))
 {
 if( Midi_Faders_Affectation_Type!=0)
 {
 show_type_midi(1512+(sp*4)+num_grid_player,sttmp );
 OnOffSp.SetLineWidth(2.0);
 OnOffSp.DrawOutline(CouleurBlind);
 }

 }
        
 }
 
 //Goto Grid num
if(window_focus_id==W_GRID  && index_enable_edit_Grider==1)
{
if( mouse_x>xb+105 && mouse_x<xb+135 && mouse_y>yb+70 && mouse_y<yb+85 )
 {
 GridGotoB.DrawOutline(CouleurLigne);
 }
 //Goto step num
if( mouse_x>xb+150 && mouse_x<xb+190 && mouse_y>yb+70 && mouse_y<yb+85 )
 {
 StepGotoB.DrawOutline(CouleurLigne);
 }
 //Count num
if( mouse_x>xb+150 && mouse_x<xb+190 && mouse_y>yb+90 && mouse_y<yb+105  )
 {
 CountB.DrawOutline(CouleurLigne);
 }
 //Seek step num
if( mouse_x>xb+150 && mouse_x<xb+190 && mouse_y>yb+110 && mouse_y<yb+125  )
 {
 StepSeekB.DrawOutline(CouleurLigne);
 }
if(mouse_x>xb+100 && mouse_x<xb+190 && mouse_y>yb+130 && mouse_y<yb+145 )
{
StopPlayB.DrawOutline(CouleurLigne);                                               
}
}
return(0);   
}
예제 #8
0
int echo_window(int xe, int ye)
{
Rect EchoBckgd(Vec2D(xe,  ye), Vec2D( echo_window_x_size,echo_window_y_size));
EchoBckgd.SetRoundness(15);
EchoBckgd.SetLineWidth(triple_epaisseur_ligne_fader);
EchoBckgd.Draw(CouleurFond);

if(window_focus_id==W_ECHO)
{
EchoBckgd.DrawOutline(CouleurFader);
}
else {EchoBckgd.DrawOutline(CouleurLigne); }
neuro.Print("ECHO",xe+100,ye+30);

//EDIT
Rect GriderEditEnable( Vec2D((xe+610),(ye+10)),Vec2D(50,20));
GriderEditEnable.SetRoundness(5);
if(index_enable_edit_echo==1)
{
GriderEditEnable.Draw(CouleurFader);
}
GriderEditEnable.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print("edit",xe+620 ,ye+22);


neuro.Print(ol::ToString(echo_over_channel+1),xe+625 ,ye+55);

char tcmp[24];

switch(dmx_view)
{
case 1:
sprintf(tcmp,"Level %.2f - %d",echo_levels[echo_selected][0][echo_over_channel],(int)( echo_levels[echo_selected][0][echo_over_channel]*255));
break;
case 0:
sprintf(tcmp,"Level %.2f - %d",echo_levels[echo_selected][0][echo_over_channel],(int)( echo_levels[echo_selected][0][echo_over_channel]*100));
break;
}
petitchiffre.Print(tcmp,xe+500 ,ye+45);

switch(dmx_view)
{
case 1:
sprintf(tcmp,"Ground %.2f - %d",echo_levels[echo_selected][1][echo_over_channel],(int)( echo_levels[echo_selected][1][echo_over_channel]*255));
break;
case 0:
sprintf(tcmp,"Ground %.2f - %d",echo_levels[echo_selected][1][echo_over_channel],(int)( echo_levels[echo_selected][1][echo_over_channel]*100));
break;
}
petitchiffre.Print(tcmp,xe+500 ,ye+70);

//sab 02/03/2014 sprintf(tcmp,"");
strcpy(tcmp,"");

int index_ec=0;

//ECHO presets



Rect EchoPreset(Vec2D(xe+10,ye+10),Vec2D(30,15));
EchoPreset.SetRoundness(4);
for(int le=0;le<3;le++)
{
for(int cel=0;cel<8;cel++)
{
index_ec=cel+(le*8);
EchoPreset.MoveTo(Vec2D(xe+180+(cel*40),ye+10+(le*25)));
if(echo_selected==index_ec){EchoPreset.Draw(CouleurFader);}
EchoPreset.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print(ol::ToString(index_ec+1),xe+188+(cel*40),ye+20+(le*25));


if(window_focus_id==W_ECHO && dragging_channel_in_echo==0 && mouse_x> xe+180+(40*cel) && mouse_x<xe+210+(40*cel) && mouse_y>ye+10+(le*25) && mouse_y<ye+30+(le*25))
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
sprintf(tcmp,"Echo Preset %d",index_ec+1);
show_type_midi(1663+index_ec, tcmp);
EchoPreset.DrawOutline(CouleurBlind);
}
}
}
}


 Rect SetChannpos(Vec2D(xe+615,ye+65),Vec2D(40,20));
 SetChannpos.SetRoundness(5);
 SetChannpos.Draw(Discrete2);
 SetChannpos.DrawOutline(CouleurLigne.WithAlpha(0.4));
 petitchiffre.Print(ol::ToString(echo_grid_channel_position[echo_selected]+1),xe+625,ye+78);

 if(window_focus_id==W_ECHO && mouse_x>xe+615 && mouse_x<xe+655 && mouse_y>ye+65 && mouse_y<ye+85)
 {
 SetChannpos.DrawOutline(CouleurLigne.WithAlpha(0.7));
 }

//ECHO ACTION PANNEL
Rect Action(Vec2D(xe+10,ye+40),Vec2D(115,20));
Action.SetRoundness(4);
for (int n=0;n<5;n++)
{
Action.MoveTo(Vec2D(xe+10,ye+50+(n*30)));
Action.DrawOutline(CouleurLigne.WithAlpha(0.5));
switch(n)
{
case 0:
     Action.Draw(CouleurFader.WithAlpha(echo_is_echo_mode[echo_selected]));
     petitchiffre.Print("ECHO FADER",xe+30,ye+62+(n*30));
     sprintf(tcmp,"ECHO FADER");
break;
case 1:
     petitchiffre.Print("SNAP FADER",xe+30,ye+62+(n*30));
     sprintf(tcmp,"SNAP FADER");
break;
case 2:

     Action.Draw(CouleurFader.WithAlpha(do_bounce[echo_selected]));
     petitchiffre.Print("BOUNCE !",xe+35,ye+62+(n*30));
     sprintf(tcmp,"BOUNCE !");
break;
case 3:
     petitchiffre.Print("SNAP-KILL-BOUNCE",xe+11,ye+62+(n*30));
     sprintf(tcmp,"SNAP-KILL-BOUNCE");
break;
case 4:
     petitchiffre.Print("GET BACK FADER",xe+15,ye+62+(n*30));
     sprintf(tcmp,"GET BACK FADER");
break;
default:
break;
}

//actions
if(window_focus_id==W_ECHO && dragging_channel_in_echo==0  && mouse_x>xe+30 && mouse_x<xe+145 && mouse_y>ye+50+(n*30) && mouse_y<ye+80+(n*30))
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
show_type_midi(1686+n, tcmp);
Action.DrawOutline(CouleurBlind);
}


}
}


petitchiffre.Print("FADER",xe+10,ye+218);
Rect FBox(Vec2D(xe+70,ye+200),Vec2D(45,35));
FBox.SetRoundness(5);
FBox.DrawOutline(CouleurLigne.WithAlpha(0.5));

neuro.Print(ol::ToString(echo_pointing_fader_num[echo_selected]),xe+80,ye+220);

if(window_focus_id==W_ECHO && mouse_x>xe+70 && mouse_x<xe+115 && mouse_y>ye+200 && mouse_y<ye+235)
{
FBox.DrawOutline(CouleurLigne);

}

////AFFECT TO DOCK
Rect Affecttodock(Vec2D(xe+10,ye+245), Vec2D(110,20));
Affecttodock.SetRoundness(7.5);
if(index_affect_echo_to_dock==1){Affecttodock.Draw(CouleurFader);}
Affecttodock.DrawOutline(CouleurLigne.WithAlpha(0.5));

petitchiffre.Print( "Affect To Dock",(xe+20), (ye+258));





//manipulate channel params

//ECHO ACTION PANNEL
Rect ActionTyp(Vec2D(xe+500,ye+10),Vec2D(70,20));
ActionTyp.SetRoundness(4);


switch(echo_channel_manipulate_mode[echo_selected])
{
case 0:
     ActionTyp.Draw(Discrete8);
     petitchiffre.Print("CH.LEVEL",xe+507,ye+22);
     sprintf(tcmp,"CH.LEVEL");
break;
case 1:
     ActionTyp.Draw(Discrete2);
     petitchiffre.Print("CH.GRND",xe+507,ye+22);
     sprintf(tcmp,"CH.GROUND");
break;
}

ActionTyp.DrawOutline(CouleurLigne.WithAlpha(0.5));


if(window_focus_id==W_ECHO && mouse_x>xe+500 && mouse_x<xe+570 && mouse_y>ye+10&& mouse_y<ye+30)
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
show_type_midi(1696, tcmp);
ActionTyp.DrawOutline(CouleurBlind);
}
}





Echo_Aera(xe+155,ye+95);


Rect Frame(Vec2D(xe+185,ye+255),Vec2D(127,10));
float tmp_lev=0;


Circle BMidiOut(xe+316,ye+255, 5);


char mid_lev[8];
for (int cl=0;cl<3;cl++)
{
tmp_lev=echo_global_params[echo_selected][cl];
switch(cl)
{
 case 0:
 sprintf(tcmp,"Gravity:     %.2f",tmp_lev);
 break;
 case 1:
 sprintf(tcmp,"Mass:        %.2f",tmp_lev);
 break;
 case 2:
 sprintf(tcmp,"Energy: %.2f",tmp_lev);
 break;
 default:
  //sab 02/03/2014 sprintf(tcmp,"");
  strcpy(tcmp,"");
 break;
}
sprintf(mid_lev,"%d",(int)(tmp_lev*127));
Rect LevelF(Vec2D(xe+155+(cl*180),ye+255),Vec2D(tmp_lev*127,10));
LevelF.Draw(Discrete8);
Frame.MoveTo(Vec2D(xe+155+(cl*180),ye+255));
Frame.DrawOutline(CouleurLigne.WithAlpha(0.5));
petitchiffre.Print(tcmp,xe+155+(cl*180),ye+248);
BMidiOut.MoveTo(Vec2D(xe+295+(cl*180),ye+265));
if(midi_send_out[1693+cl]==1)
{
BMidiOut.Draw(CouleurBlind);
}
BMidiOut.DrawOutline(CouleurGrisMoyen);
petitchiffrerouge.Print(mid_lev,xe+286+(cl*180),ye+252);

if(window_focus_id==W_ECHO && mouse_x>=xe+155+(cl*180) && mouse_x<=xe+285+(cl*180) && mouse_y>=ye+255 && mouse_y<=ye+265)
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
show_type_midi(1693+cl, tcmp);
Frame.DrawOutline(CouleurBlind);
}

}


}



return(0);
}
예제 #9
0
int Echo_Aera(int xe, int ye)
{
//Aera channels
Rect Aera(Vec2D(xe,ye),Vec2D(500,127));
Aera.SetRoundness(4);
Aera.Draw(Discrete8);

Rect PreviousChan(Vec2D(xe,ye),Vec2D(25,127));
PreviousChan.SetRoundness(4);
Line(Vec2D(xe+5,ye+64),Vec2D(xe+15,ye+54)).Draw(CouleurLigne);
Line(Vec2D(xe+15,ye+54),Vec2D(xe+15,ye+74)).Draw(CouleurLigne);
Line(Vec2D(xe+15,ye+74),Vec2D(xe+5,ye+64)).Draw(CouleurLigne);


Rect NextChan(Vec2D(xe+475,ye),Vec2D(25,127));
NextChan.SetRoundness(4);
Line(Vec2D(xe+490,ye+64),Vec2D(xe+480,ye+54)).Draw(CouleurLigne);
Line(Vec2D(xe+480,ye+54),Vec2D(xe+480,ye+74)).Draw(CouleurLigne);
Line(Vec2D(xe+480,ye+74),Vec2D(xe+490,ye+64)).Draw(CouleurLigne);


Rect ChanEcho(Vec2D(xe+475,ye),Vec2D(30,6));





int echochanis=0;
//sab 02/03/2014 unused var float mouse_y_level=0.0;

for (int sh=0;sh<15;sh++)
{
Line(Vec2D(xe+25+(sh*30),ye),Vec2D(xe+25+(sh*30),ye+127)).Draw(CouleurLigne.WithAlpha(0.7));

echochanis=echo_grid_channel_position[echo_selected]+sh;


//ground
Rect MassE(Vec2D(xe+25+(sh*30),ye+(127*(1.0-echo_levels[echo_selected][1][echochanis]))),Vec2D(30,echo_levels[echo_selected][1][echochanis]*127));
MassE.Draw(Discrete2);

//enregistrement level de départ
ChanEcho.MoveTo(Vec2D(xe+25+(sh*30),ye+127-(snap_echo_to_recall[echo_selected][echochanis]*127)));
ChanEcho.Draw(CouleurFond.WithAlpha(0.3));

//niveau
ChanEcho.MoveTo(Vec2D(xe+25+(sh*30),ye+127-(echo_levels[echo_selected][0][echochanis]*127)));
ChanEcho.Draw(CouleurLigne);

petitchiffrenoir.Print(ol::ToString(echochanis+1),xe+30+(sh*30),ye+10);

if(window_focus_id==W_ECHO && mouse_x>xe+25+(sh*30) && mouse_x<xe+55+(sh*30) && mouse_y>=ye-5 && mouse_y<=ye+135)
{
echo_over_channel=echo_grid_channel_position[echo_selected]+sh;
}

}
Line(Vec2D(xe+25+450,ye),Vec2D(xe+475,ye+127)).Draw(CouleurLigne.WithAlpha(0.7));




char tcmp[24];
//fleches
if(window_focus_id==W_ECHO && dragging_channel_in_echo==0)
{
//Prev
if( mouse_x>xe && mouse_x<xe+25 && mouse_y>ye && mouse_y<ye+127)
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
sprintf(tcmp,"Echo Previous Chan");
show_type_midi(1691, tcmp);
PreviousChan.DrawOutline(CouleurBlind);
}
else
{PreviousChan.DrawOutline(CouleurLigne.WithAlpha(0.5));}
}
//next
else if( mouse_x>xe+475 && mouse_x<xe+500 && mouse_y>ye && mouse_y<ye+127)
{
if( Midi_Faders_Affectation_Type!=0)//config midi
{
sprintf(tcmp,"Echo next Chan");
show_type_midi(1692, tcmp);
NextChan.DrawOutline(CouleurBlind);
}
else {NextChan.DrawOutline(CouleurLigne.WithAlpha(0.5));  }
}
}

return(0);
}