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.

133 lines
3.3KB

  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. void setup_jack ( void );
  39. #include "common.h"
  40. #include "const.h"
  41. enum play_mode_e {
  42. PATTERN,
  43. SEQUENCE,
  44. TRIGGER,
  45. QUEUE
  46. // PHRASE,
  47. };
  48. enum record_mode_e {
  49. MERGE,
  50. OVERWRITE,
  51. LAYER,
  52. NEW
  53. };
  54. /* program settings (from rc file) */
  55. struct global_settings {
  56. enum record_mode_e record_mode;
  57. bool record_filtered; /* ignore non-note events while recording */
  58. bool visual_metronome; /* show visual metronome */
  59. bool follow_playhead;
  60. char *user_config_dir;
  61. };
  62. extern global_settings config;
  63. /* song settings (from song file) */
  64. struct song_settings
  65. {
  66. enum play_mode_e play_mode;
  67. char *filename;
  68. signal <void> signal_dirty; /* emitted when first dirtied */
  69. signal <void> signal_clean; /* emitted when first cleaned */
  70. bool _dirty;
  71. bool dirty ( void )
  72. {
  73. return _dirty;
  74. }
  75. void
  76. dirty( bool b )
  77. {
  78. if ( _dirty != b )
  79. {
  80. _dirty = b;
  81. if ( b )
  82. {
  83. DMESSAGE( "song is now dirty" );
  84. signal_dirty();
  85. }
  86. else
  87. {
  88. DMESSAGE( "song is now clean" );
  89. signal_clean();
  90. }
  91. }
  92. }
  93. void
  94. set_dirty ( void )
  95. {
  96. dirty( true );
  97. }
  98. struct {
  99. int feel;
  100. float probability;
  101. } random;
  102. };
  103. extern song_settings song;