Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.6KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2008 Jonathan Moore Liles */
  3. /* */
  4. /* This program is free software; you can redistribute it and/or modify it */
  5. /* under the terms of the GNU General Public License as published by the */
  6. /* Free Software Foundation; either version 2 of the License, or (at your */
  7. /* option) any later version. */
  8. /* */
  9. /* This program is distributed in the hope that it will be useful, but WITHOUT */
  10. /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
  11. /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
  12. /* more details. */
  13. /* */
  14. /* You should have received a copy of the GNU General Public License along */
  15. /* with This program; see the file COPYING. If not,write to the Free Software */
  16. /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  17. /*******************************************************************************/
  18. #pragma once
  19. #include "event.H"
  20. #include <list>
  21. namespace MIDI {
  22. using std::list;
  23. class midievent;
  24. class event_list {
  25. event * _head;
  26. event * _tail;
  27. size_t _size;
  28. void _insert ( event *o, event *n );
  29. void _copy ( const event_list *el );
  30. void _hi_lo ( bool sel, int *hi, int *lo ) const;
  31. public:
  32. event_list ( void );
  33. ~event_list ( void );
  34. event_list ( const event_list &el );
  35. void clear ( void );
  36. void merge ( event_list *el );
  37. void unlink ( event *e );
  38. void remove ( event *e );
  39. void insert ( event *e );
  40. event * first ( void ) const;
  41. event * last ( void ) const;
  42. void select ( tick_t start, tick_t end );
  43. void select ( tick_t start, tick_t end, int hi, int lo );
  44. void select_all ( void );
  45. void select_none ( void );
  46. void invert_selection ( void );
  47. void copy_selected ( event_list *el ) const;
  48. void paste ( tick_t offset, const event_list *el );
  49. void remove_selected ( void );
  50. void transpose_selected ( int n );
  51. tick_t selection_min ( void ) const;
  52. tick_t selection_max ( void ) const;
  53. void move_selected ( tick_t tick );
  54. void nudge_selected ( long o );
  55. void push_selection ( void );
  56. void pop_selection ( void );
  57. void selected_velocity ( int v );
  58. bool verify ( void ) const;
  59. void link ( event *on );
  60. void insert_time ( tick_t start, tick_t l );
  61. void delete_time ( tick_t start, tick_t end );
  62. void relink ( void );
  63. void sort ( event *e );
  64. void sort ( void );
  65. void move ( event *e, long o );
  66. bool empty ( void ) const;
  67. size_t size ( void ) const;
  68. void append ( event *e );
  69. void mix ( event *ne );
  70. void hi_lo_note ( int *hi, int *lo ) const;
  71. void rewrite_selected ( int from, int to );
  72. void selected_hi_lo_note ( int *hi, int *lo ) const;
  73. event_list & operator= ( const event_list &rhs );
  74. event_list & operator= ( const list <midievent> &rhs );
  75. event *operator[] ( unsigned int index );
  76. // friend class event;
  77. };
  78. }