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.

99 lines
3.0KB

  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_Single_Window.H>
  20. #include <FL/Fl_Single_Window.H>
  21. #include <FL/Fl_Scroll.H>
  22. #include <FL/Fl_Pack.H>
  23. #include "Mixer_Strip.H"
  24. #include <stdlib.h>
  25. #include <unistd.h>
  26. #include "DPM.H"
  27. Fl_Single_Window *main_window;
  28. #include <FL/Boxtypes.H>
  29. int
  30. main ( int argc, char **arv )
  31. {
  32. Fl::get_system_colors();
  33. Fl::scheme( "plastic" );
  34. init_boxtypes();
  35. Fl_Pack * mixer_strips;
  36. Fl_Single_Window *o = main_window = new Fl_Single_Window( 1024, 768 );
  37. {
  38. Fl_Scroll *o = new Fl_Scroll( 0, 0, main_window->w(), main_window->h() );
  39. main_window->resizable( o );
  40. {
  41. Fl_Pack *o = mixer_strips = new Fl_Pack( 0, 0, 1, main_window->h() );
  42. o->type( Fl_Pack::HORIZONTAL );
  43. {
  44. for ( int i = 16; i-- ; )
  45. new Mixer_Strip( 0, 0, 120, main_window->h() + 150 );
  46. }
  47. o->end();
  48. }
  49. o->end();
  50. }
  51. o->end();
  52. o->show();
  53. while ( 1 )
  54. {
  55. for ( int i = mixer_strips->children(); i--; )
  56. {
  57. Meter_Pack *mp = (Meter_Pack*)((Mixer_Strip*) mixer_strips->child( i ))->meters_pack;
  58. for ( int j = mp->channels(); j-- ; )
  59. {
  60. Meter *o = mp->channel( j );
  61. float v = o->value();
  62. float r = ((rand() / (float)RAND_MAX) - 0.5f) * 10.0f;
  63. v += r;
  64. if ( v > 4.0f ) v = 0.0f;
  65. if ( v < -80.0f ) v = 0.0f;
  66. o->value( v );
  67. }
  68. }
  69. Fl::wait( 0.02f );
  70. /* Fl::check(); */
  71. /* usleep( 50000 ); */
  72. }
  73. // Fl::run();
  74. }