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.

120 lines
3.1KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2007,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 "common.h"
  20. #include "pattern.H"
  21. #include "phrase.H"
  22. #include "sequence.H"
  23. enum {
  24. PLAY,
  25. MUTE,
  26. SOLO
  27. };
  28. class Canvas;
  29. class Lash;
  30. extern Canvas *pattern_c, *phrase_c;
  31. extern sequence *playlist;
  32. extern Lash lash;
  33. void quit ( void );
  34. void init_song ( void );
  35. void handle_midi_input ( void );
  36. bool load_song ( const char *name );
  37. bool save_song ( const char *name );
  38. #include "common.h"
  39. #include "const.h"
  40. enum play_mode_e {
  41. PATTERN,
  42. SEQUENCE,
  43. TRIGGER
  44. // PHRASE,
  45. };
  46. enum record_mode_e {
  47. MERGE,
  48. OVERWRITE,
  49. LAYER,
  50. NEW
  51. };
  52. /* program settings (from rc file) */
  53. struct global_settings {
  54. enum record_mode_e record_mode;
  55. bool record_filtered; /* ignore non-note events while recording */
  56. bool visual_metronome; /* show visual metronome */
  57. bool follow_playhead;
  58. char *user_config_dir;
  59. };
  60. extern global_settings config;
  61. /* song settings (from song file) */
  62. struct song_settings
  63. {
  64. enum play_mode_e play_mode;
  65. char *filename;
  66. signal <void> signal_dirty; /* emitted when first dirtied */
  67. signal <void> signal_clean; /* emitted when first cleaned */
  68. bool _dirty;
  69. bool dirty ( void )
  70. {
  71. return _dirty;
  72. }
  73. void
  74. dirty( bool b )
  75. {
  76. if ( _dirty != b )
  77. {
  78. _dirty = b;
  79. if ( b )
  80. signal_dirty();
  81. else
  82. signal_clean();
  83. }
  84. }
  85. struct {
  86. int feel;
  87. float probability;
  88. } random;
  89. };
  90. extern song_settings song;