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.

116 lines
3.1KB

  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. #include <FL/Fl.H>
  19. #include <FL/Fl_Window.H>
  20. #include <FL/Fl_Double_Window.H>
  21. #include <FL/Fl_Overlay_Window.H>
  22. #include <FL/Fl_Scroll.H>
  23. // #include <FL/Fl_Scrollbar.H>
  24. #include <FL/Fl_Pack.H>
  25. #include <FL/Fl_Group.H>
  26. #include <FL/Fl_Slider.H>
  27. #include <FL/Fl_Button.H>
  28. #include "Scalebar.H"
  29. // #include "Waveform.H"
  30. #include "Region.H"
  31. #include <stdio.h>
  32. #include <unistd.h>
  33. #include <sys/stat.h>
  34. #include <stdlib.h>
  35. #include <string.h>
  36. #include "Sequence.H"
  37. #include "Audio_Sequence.H"
  38. #include "Timeline.H"
  39. #include "Tempo_Sequence.H"
  40. #include "Time_Sequence.H"
  41. #include "Control_Sequence.H"
  42. #include "Transport.H"
  43. #include "Loggable.H"
  44. #include "Track.H"
  45. #include "Engine.H"
  46. // #include "Clock.H"
  47. #include "TLE.H"
  48. #include <stdlib.h>
  49. #include <sys/stat.h>
  50. Engine *engine;
  51. Timeline *timeline;
  52. Transport *transport;
  53. /* void cb_undo ( Fl_Widget *w, void *v ) */
  54. /* { */
  55. /* Loggable::undo(); */
  56. /* } */
  57. char *user_config_dir;
  58. static int
  59. ensure_dirs ( void )
  60. {
  61. asprintf( &user_config_dir, "%s/.non-daw", getenv( "HOME" ) );
  62. return 0 == mkdir( user_config_dir, 0777 );
  63. }
  64. int
  65. main ( int argc, char **argv )
  66. {
  67. /* welcome to C++ */
  68. LOG_REGISTER_CREATE( Region );
  69. LOG_REGISTER_CREATE( Time_Point );
  70. LOG_REGISTER_CREATE( Tempo_Point );
  71. LOG_REGISTER_CREATE( Control_Point );
  72. LOG_REGISTER_CREATE( Track );
  73. LOG_REGISTER_CREATE( Audio_Sequence );
  74. LOG_REGISTER_CREATE( Control_Sequence );
  75. if ( ! ensure_dirs() )
  76. /* error */;
  77. /* TODO: change to seesion dir */
  78. TLE tle;
  79. /* we don't really need a pointer for this */
  80. engine = new Engine;
  81. engine->init();
  82. Loggable::open( "history" );
  83. // Fl::add_timeout( UPDATE_FREQ, clock_update_cb, o );
  84. tle.main_window->show( argc, argv );
  85. Fl::run();
  86. }