Subversion Repositories svn.mios32

Rev

Rev 740 | Rev 742 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 740 Rev 741
Line 1... Line 1...
1
// $Id: seq_ui.c 740 2009-10-09 20:24:39Z tk $
1
// $Id: seq_ui.c 741 2009-10-10 16:00:10Z tk $
2
/*
2
/*
3
 * User Interface Routines
3
 * User Interface Routines
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 803... Line 803...
803
  return 0; // no error
803
  return 0; // no error
804
}
804
}
805
805
806
static s32 SEQ_UI_Button_Edit(s32 depressed)
806
static s32 SEQ_UI_Button_Edit(s32 depressed)
807
{
807
{
808
  seq_ui_button_state.EXIT_PRESSED = depressed ? 0 : 1;
808
  seq_ui_button_state.EDIT_PRESSED = depressed ? 0 : 1;
809
809
810
  if( depressed ) return -1; // ignore when button depressed
810
  if( depressed ) return -1; // ignore when button depressed
811
811
812
  // change to edit page
812
  // change to edit page
813
  SEQ_UI_PageSet(SEQ_UI_PAGE_EDIT);
813
  SEQ_UI_PageSet(SEQ_UI_PAGE_EDIT);
Line 1452... Line 1452...
1452
    SEQ_UI_Encoder_Handler(midi_package.cc_number-15, (int)midi_package.value - 0x40);
1452
    SEQ_UI_Encoder_Handler(midi_package.cc_number-15, (int)midi_package.value - 0x40);
1453
    } break;
1453
    } break;
1454
  }
1454
  }
1455
1455
1456
  return 1; // MIDI event has been taken for remote function -> don't forward to router/MIDI event parser
1456
  return 1; // MIDI event has been taken for remote function -> don't forward to router/MIDI event parser
-
 
1457
}
-
 
1458
-
 
1459
-
 
1460
/////////////////////////////////////////////////////////////////////////////
-
 
1461
// MIDI Remote Keyboard Function (called from SEQ_MIDI_IN)
-
 
1462
/////////////////////////////////////////////////////////////////////////////
-
 
1463
s32 SEQ_UI_REMOTE_MIDI_Keyboard(u8 note, u8 depressed)
-
 
1464
{
-
 
1465
#if 1
-
 
1466
  MIOS32_MIDI_SendDebugMessage("SEQ_UI_REMOTE_MIDI_Keyboard(%d, %d)\n", note, depressed);
-
 
1467
#endif
-
 
1468
  return 0; // no error
1457
}
1469
}
1458
1470
1459
1471
1460
/////////////////////////////////////////////////////////////////////////////
1472
/////////////////////////////////////////////////////////////////////////////
1461
// Update LCD messages
1473
// Update LCD messages
Line 1621... Line 1633...
1621
      if( seconds == 1 )
1633
      if( seconds == 1 )
1622
        sprintf(ui_msg[0], "Hold for 1 second ");
1634
        sprintf(ui_msg[0], "Hold for 1 second ");
1623
      else
1635
      else
1624
        sprintf(ui_msg[0], "Hold for %d seconds", seconds);
1636
        sprintf(ui_msg[0], "Hold for %d seconds", seconds);
1625
    }
1637
    }
-
 
1638
      } break;
-
 
1639
-
 
1640
      case SEQ_UI_MSG_USER_R: {
-
 
1641
    //                             00112233
-
 
1642
    const char animation_l[2*4] = "   **** ";
-
 
1643
    //                             00112233
-
 
1644
    const char animation_r[2*4] = "  * ** *";
-
 
1645
    animation_l_ptr = animation_l;
-
 
1646
    animation_r_ptr = animation_r;
-
 
1647
    msg_x = 40; // right display
-
 
1648
    right_aligned = 0;
1626
      } break;
1649
      } break;
1627
1650
1628
      default: {
1651
      default: {
1629
    //                             00112233
1652
    //                             00112233
1630
    const char animation_l[2*4] = "   **** ";
1653
    const char animation_l[2*4] = "   **** ";