1 # data file for the FLTK User Interface Designer (FLUID)
4 do_not_include_H_from_C
11 Epichord - a midi sequencer
12 Copyright (C) 2008 Evan Rinehart
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License
16 as published by the Free Software Foundation; either version 2
17 of the License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to
27 The Free Software Foundation, Inc.
28 51 Franklin Street, Fifth Floor
29 Boston, MA 02110-1301, USA
32 decl {\#include <stdlib.h>} {}
34 decl {\#include <fltk/events.h>} {}
36 decl {\#include <fltk/file_chooser.h>} {}
38 decl {\#include "backend.h"} {}
40 decl {\#include "util.h"} {}
42 decl {\#include "uihelper.h"} {}
44 decl {\#include "config.h"} {}
46 decl {extern UI* ui;} {}
52 {fltk::Window} main_window {
54 callback {if(!fltk::ask("Quit?")){
58 config_window->hide();
60 action_window->hide();
65 xywh {362 103 640 480} hide resizable
66 extra_code {\#include <stdio.h>
68 \#include <fltk/ask.h>
71 \#include "trackmodule.h"
72 o->size_range(640,455);
75 {fltk::Group} {} {open
78 {fltk::Group} song_edit {open
81 {fltk::Group} {} {open
82 xywh {0 0 255 445} box FLAT_BOX
84 {fltk::Widget} track_info {
86 xywh {0 15 255 415} resizable
87 extra_code {\#include "trackinfo.h"}
92 callback {ui->track_info->toggle_controls();}
93 tooltip {more settings}
98 callback {track* t = new track();
100 ui->track_info->redraw();
101 ui->arranger->layout();
102 ui->song_vscroll->redraw();}
103 tooltip {add new track}
108 tooltip {delete last track}
112 {fltk::Group} {} {open
115 {fltk::Widget} song_timeline {
117 xywh {0 0 370 15} resizable
118 extra_code {o->scale=16;
123 {fltk::Group} song_scrollgroup {
124 xywh {255 15 385 430} resizable
126 {fltk::Widget} arranger {
128 xywh {0 0 370 415} resizable box FLAT_BOX
129 extra_code {\#include "seq.h"
130 \#include "arranger.h"}
133 {fltk::Scrollbar} song_vscroll {
134 callback {int target = (int)o->value();
135 int dummy = ui->arranger->scrollx;
136 ui->arranger->scrollTo(dummy,target);}
137 xywh {370 0 15 415} slider_size 60
139 {fltk::ThumbWheel} song_hscroll {
140 callback {ui->arranger->scrollTo((int)o->value(),ui->arranger->scrolly);}
141 xywh {0 415 370 15} maximum 10000 step 10
145 {fltk::Group} pattern_edit {
146 xywh {0 0 640 445} hide
148 {fltk::Group} {} {open
149 xywh {45 0 595 445} resizable
154 {fltk::Widget} pattern_timeline {
156 xywh {0 0 580 15} resizable box FLAT_BOX
157 extra_code {\#include "timeline.h"
162 {fltk::Group} pattern_scrollgroup {open
163 xywh {0 15 595 355} resizable
165 {fltk::Widget} piano_roll {
167 xywh {0 0 580 340} resizable box FLAT_BOX
168 extra_code {\#include "pianoroll.h"}
171 {fltk::Scrollbar} pattern_vscroll {
172 callback {int target = (int)o->value();
173 int dummy = ui->piano_roll->scrollx;
174 ui->piano_roll->scrollTo(dummy,target);}
177 {fltk::ThumbWheel} pattern_hscroll {
178 callback {ui->piano_roll->scrollTo((int)o->value(),ui->piano_roll->scrolly);}
179 xywh {0 340 580 15} step 10
185 {fltk::Widget} event_edit {
187 xywh {0 0 580 75} resizable box FLAT_BOX
188 extra_code {\#include "eventedit.h"}
191 {fltk::Widget} event_menu {
192 xywh {0 0 580 75} hide box FLAT_BOX
193 extra_code {\#include "eventmenu.h"}
196 {fltk::Button} event_menu_button {
198 callback {if(o->state()==0){
199 ui->event_menu->hide();
200 ui->event_edit->show();
203 ui->event_edit->hide();
204 ui->event_edit->recount_has();
205 ui->event_menu->show();
207 tooltip {pick event type}
209 extra_code {o->type(fltk::Button::TOGGLE);}
213 callback {ui->event_edit->label_flag = o->state();
214 ui->event_edit->redraw();}
215 tooltip {toggle event value labels}
217 extra_code {o->type(fltk::Button::TOGGLE);}
221 callback {ui->event_edit->clear_events();}
222 tooltip {clear these events}
227 callback {ui->event_edit->clear_non_note_events();}
228 tooltip {clear all non note events in pattern}
233 callback {ui->event_edit->clear_all_events();}
234 tooltip {clear everything}
235 xywh {580 60 15 15} labelcolor 0xff000000
239 {fltk::Group} {} {open
240 xywh {0 0 45 445} horizontal
246 {fltk::Group} {} {open
247 xywh {0 15 45 340} resizable
249 {fltk::Widget} track_select {
252 extra_code {\#include "trackselect.h"}
255 {fltk::Widget} sample_view {
258 extra_code {\#include "sampleview.h"}
261 {fltk::Widget} keyboard {
264 extra_code {\#include "keyboard.h"}
270 callback {show_song_edit();}
277 xywh {0 445 640 35} box UP_BOX
279 {fltk::Button} play_button {
281 callback {press_play();}
282 xywh {5 5 25 25} labelcolor 0x800000
284 {fltk::Button} stop_button {
286 callback {press_stop();}
287 xywh {35 5 25 25} labelcolor 0x800000
289 {fltk::Button} record_button {
291 callback {toggle_backend_recording();}
292 xywh {65 5 25 25} labelcolor 0xff000000
293 extra_code {o->type(fltk::Button::TOGGLE);}
295 {fltk::Widget} metronome {
297 xywh {95 5 25 25} color 56 labelcolor 0xffffff00
298 extra_code {\#include <metronome.h>}
301 {fltk::Button} loop_toggle {
302 callback {toggle_loop();}
303 tooltip {toggle looping}
305 extra_code {o->type(fltk::Button::TOGGLE);}
307 {fltk::Group} {} {open
308 xywh {155 0 20 35} resizable
310 {fltk::Group} pattern_buttons {
311 xywh {200 5 310 25} hide
313 {fltk::Button} quant1_button {
315 tooltip {quantize selected notes}
318 {fltk::Button} quant0_button {
320 tooltip {quantize length of selected notes}
323 {fltk::Button} tool_button {
325 callback {toggle_tool();}
328 {fltk::Button} qbutton4 {
329 callback {set_quant(4);}
331 extra_code {o->type(fltk::Button::TOGGLE);}
333 {fltk::Button} qbutton8 {
334 callback {set_quant(8);}
336 extra_code {o->type(fltk::Button::TOGGLE);}
338 {fltk::Button} qbutton16 {
339 callback {set_quant(16);}
341 extra_code {o->type(fltk::Button::TOGGLE);
344 {fltk::Button} qbutton32 {
345 callback {set_quant(32);}
347 extra_code {o->type(fltk::Button::TOGGLE);}
349 {fltk::Button} qbutton64 {
350 callback {set_quant(64);}
352 extra_code {o->type(fltk::Button::TOGGLE);}
354 {fltk::Button} qbutton128 {
355 callback {set_quant(128);}
357 extra_code {o->type(fltk::Button::TOGGLE);}
359 {fltk::Button} qbutton0 {
360 callback {set_quant(0);}
362 extra_code {o->type(fltk::Button::TOGGLE);}
365 {fltk::Group} song_buttons {open
368 {fltk::Button} edit_button {
369 callback {set_songtool(0);}
370 tooltip {create delete move resize select paste blocks}
371 xywh {0 0 25 25} value 1
373 {fltk::Button} color_button {
374 callback {set_songtool(1);}
377 extra_code {o->type(fltk::Button::TOGGLE);}
379 {fltk::Button} unclone_button {
380 callback {set_songtool(2);}
381 tooltip {click on blocks to unclone them}
383 extra_code {o->type(fltk::Button::TOGGLE);}
385 {fltk::Button} split_button {
386 callback {set_songtool(3);}
387 tooltip {click on a block to split in two}
389 extra_code {o->type(fltk::Button::TOGGLE);}
391 {fltk::Button} join_button {
392 callback {set_songtool(4);}
393 tooltip {click on adjacent blocks to join them}
395 extra_code {o->type(fltk::Button::TOGGLE);}
398 {fltk::Button} conf_button {
399 callback {if(o->state()){
400 ui->config_window->show();
403 ui->config_window->hide();
405 tooltip configuration
407 extra_code {o->type(fltk::Button::TOGGLE);}
409 {fltk::Button} scope_button {
410 callback {if(o->state()){
411 ui->scope_window->show();
414 ui->scope_window->hide();
418 extra_code {o->type(fltk::Button::TOGGLE);}
420 {fltk::Button} file_button {
421 callback {if(o->state()){
422 ui->action_window->show();
425 ui->action_window->hide();
429 extra_code {\#include "saveload.h"
430 o->type(fltk::Button::TOGGLE);}
432 {fltk::Button} help_button {
433 callback {if(o->state()){
434 ui->help_window->show();
437 ui->help_window->hide();
441 extra_code {o->type(fltk::Button::TOGGLE);}
445 {fltk::Window} config_window {
447 callback {ui->conf_button->state(0);
449 xywh {52 125 320 285} hide
451 {fltk::TabGroup} {} {open
456 xywh {145 15 170 265} horizontal
458 {fltk::ValueInput} beats_per_measure {
459 label {beats per measure}
460 callback {if(o->value() > o->maximum())
461 o->value(o->maximum());
462 if(o->value() < o->minimum())
463 o->value(o->minimum());
464 set_beats_per_measure((int)o->value());}
465 xywh {5 5 45 20} minimum 1 maximum 31 step 1 value 4
467 {fltk::ValueInput} measures_per_phrase {
468 label {measures per phrase}
469 callback {if(o->value() > o->maximum())
470 o->value(o->maximum());
471 if(o->value() < o->minimum())
472 o->value(o->minimum());
473 set_measures_per_phrase((int)o->value());}
474 xywh {5 30 45 20} maximum 128 step 1 value 4
476 {fltk::ValueOutput} bpm_output {
478 xywh {5 55 45 20} minimum 1 maximum 1000 step 1 value 120
480 {fltk::ThumbWheel} bpm_wheel {
481 callback {set_bpm((int)o->value());
482 ui->bpm_output->value(o->value());}
483 xywh {55 55 105 20} align 4 minimum 1 maximum 1000 step 1 value 120
485 {fltk::ValueInput} measures_until_record {
486 label {measures until record}
487 callback {if(o->value() > o->maximum())
488 o->value(o->maximum());
489 if(o->value() < o->minimum())
490 o->value(o->minimum());
491 set_measures_until_record((int)o->value());}
492 xywh {5 80 45 20} maximum 128 step 1 value 1
494 {fltk::CheckButton} check_alwayscopy {
495 label {always hard copy}
496 callback {set_alwayscopy(o->value());}
497 tooltip {instead of making a linked clone when you copy a block in the song view.}
498 xywh {5 105 25 25} align 4
500 {fltk::CheckButton} check_autotrackname {
501 label {auto track name}
502 callback {set_autotrackname(o->value());}
503 tooltip {Fill in GM instruments for track names when you change the program.}
504 xywh {145 105 25 25} align 4
506 {fltk::CheckButton} check_passthru {
507 label {record pass-thru}
508 callback {set_passthru(o->value());}
509 tooltip {Echo midi input to midi output.}
510 xywh {5 130 25 26} horizontal align 4 value 1
512 {fltk::CheckButton} check_playinsert {
513 label {play note insertion}
514 callback {set_playinsert(o->value());}
515 tooltip {Send midi note on when you create notes.}
516 xywh {145 130 25 26} horizontal align 4 value 1
518 {fltk::CheckButton} check_recordonchan {
519 label {record on channel}
520 callback {set_recordonchan(o->value());}
521 tooltip {Record on first track that matches channel of midi input instead of selected track.}
522 xywh {5 155 25 25} align 4
524 {fltk::CheckButton} check_playmove {
525 label {play note move}
526 callback {set_playmove(o->value());}
527 tooltip {Send midi note on when you move notes.}
528 xywh {145 155 25 26} horizontal align 4 value 1
530 {fltk::CheckButton} check_follow {
531 label {follow playback}
532 callback {set_follow(o->value());}
533 tooltip {Auto scroll horizontally when play head leaves viewing area.}
534 xywh {5 179 25 26} horizontal align 4 value 1
536 {fltk::ValueInput} default_velocity {
537 label {default velocity}
538 callback {if(o->value() > o->maximum())
539 o->value(o->maximum());
540 if(o->value() < o->minimum())
541 o->value(o->minimum());
542 set_defaultvelocity((int)o->value());}
543 xywh {120 180 45 20} maximum 127 step 1 value 96
545 {fltk::Choice} menu_recordmode {
546 label {record mode} open
551 callback {set_recordmode(0);}
555 callback {set_recordmode(1);}
559 callback {set_recordmode(2);}
562 {fltk::Choice} menu_rob {
563 label {record outside block} open
568 callback {set_robmode(0);}
572 callback {set_robmode(1);}
576 callback {set_robmode(2);}
582 xywh {0 15 320 270} hide
584 {fltk::Widget} kg_l0 {
586 xywh {35 5 45 15} align 4
589 {fltk::Widget} kg_l1 {
591 xywh {35 20 45 15} align 4
594 {fltk::Widget} kg_l2 {
596 xywh {35 35 45 15} align 4
599 {fltk::Widget} kg_l3 {
601 xywh {35 50 45 15} align 4
604 {fltk::Widget} kg_l4 {
606 xywh {35 65 45 15} align 4
609 {fltk::Widget} kg_l5 {
611 xywh {35 80 45 15} align 4
614 {fltk::Widget} kg_l6 {
616 xywh {35 95 45 15} align 4
619 {fltk::Widget} kg_l7 {
621 xywh {35 110 45 15} align 4
624 {fltk::Widget} kg_l8 {
626 xywh {35 125 45 15} align 4
629 {fltk::Widget} kg_l9 {
631 xywh {35 140 45 15} align 4
634 {fltk::Widget} kg_l10 {
637 xywh {35 155 45 15} align 4
640 {fltk::Widget} kg_l11 {
642 xywh {35 170 45 15} align 4
645 {fltk::Widget} kg_l12 {
647 xywh {35 185 45 15} align 4
650 {fltk::Widget} kg_l13 {
652 xywh {35 200 45 15} align 4
655 {fltk::Widget} kg_l14 {
657 xywh {35 215 45 15} align 4
660 {fltk::Widget} kg_l15 {
662 xywh {35 230 45 15} align 4
665 {fltk::Widget} kg_l16 {
667 xywh {35 245 45 15} align 4
670 {fltk::Widget} kg_u0 {
672 xywh {130 5 45 15} align 4
675 {fltk::Widget} kg_u1 {
677 xywh {130 20 45 15} align 4
680 {fltk::Widget} kg_u2 {
682 xywh {130 35 45 15} align 4
685 {fltk::Widget} kg_u3 {
687 xywh {130 50 45 15} align 4
690 {fltk::Widget} kg_u4 {
692 xywh {130 65 45 15} align 4
695 {fltk::Widget} kg_u5 {
697 xywh {130 80 45 15} align 4
700 {fltk::Widget} kg_u6 {
702 xywh {130 95 45 15} align 4
705 {fltk::Widget} kg_u7 {
707 xywh {130 110 45 15} align 4
710 {fltk::Widget} kg_u8 {
712 xywh {130 125 45 15} align 4
715 {fltk::Widget} kg_u9 {
717 xywh {130 140 45 15} align 4
720 {fltk::Widget} kg_u10 {
722 xywh {130 155 45 15} align 4
725 {fltk::Widget} kg_u11 {
727 xywh {130 170 45 15} align 4
730 {fltk::Widget} kg_u12 {
732 xywh {130 185 45 15} align 4
735 {fltk::Widget} kg_u13 {
737 xywh {130 200 45 15} align 4
740 {fltk::Widget} kg_u14 {
742 xywh {130 215 45 15} align 4
745 {fltk::Widget} kg_u15 {
747 xywh {130 230 45 15} align 4
750 {fltk::Widget} kg_u16 {
752 xywh {130 245 45 15} align 4
755 {fltk::Widget} kg_u17 {
757 xywh {265 5 45 15} align 4
760 {fltk::Widget} kg_u18 {
762 xywh {265 20 45 15} align 4
765 {fltk::Widget} kg_u19 {
767 xywh {265 35 45 15} align 4
770 {fltk::Widget} kg_u20 {
772 xywh {265 50 45 15} align 4
775 {fltk::Widget} kg_zi {
777 xywh {265 65 45 15} align 4
780 {fltk::Widget} kg_zo {
782 xywh {265 80 45 15} align 4
785 {fltk::Widget} kg_ou {
787 xywh {265 95 45 15} align 4
790 {fltk::Widget} kg_od {
792 xywh {265 110 45 15} align 4
798 xywh {0 15 320 270} hide
821 {fltk::Window} help_window {
823 callback {ui->help_button->state(0);
825 xywh {519 345 580 370} hide resizable
826 extra_code {o->size_range(580,370);}
828 {fltk::TabGroup} {} {open
833 xywh {0 25 580 345} resizable
835 {fltk::Input} title_text {
839 {fltk::Input} author_text {
843 {fltk::TextEditor} info_text {
844 xywh {5 55 570 285} resizable textfont 4
849 xywh {0 25 580 345} hide
851 {fltk::TextDisplay} {} {
852 xywh {5 5 570 335} resizable textfont 4
853 extra_code {load_text(o,ROOT_DATA_DIR"doc/controls.txt");}
858 xywh {0 25 580 345} hide
860 {fltk::TextDisplay} {} {
861 xywh {5 5 570 335} resizable textfont 4
862 extra_code {load_text(o,ROOT_DATA_DIR"doc/guide.txt");}
867 xywh {0 25 580 345} hide
869 {fltk::TextDisplay} {} {
870 xywh {5 5 570 335} resizable textfont 4
871 extra_code {load_text(o,ROOT_DATA_DIR"doc/license.txt");}
876 xywh {0 25 580 345} hide
878 {fltk::TextDisplay} {} {
879 xywh {5 5 570 335} resizable textfont 4
880 extra_code {load_text(o,ROOT_DATA_DIR"doc/README");}
885 {fltk::Window} action_window {
887 callback {ui->file_button->state(0);
889 xywh {286 302 100 130} horizontal hide
893 callback {reset_song();}
898 callback {action_window->hide();
904 callback {action_window->hide();
905 save(fltk::file_chooser("save file",NULL,get_last_dir()));}
910 callback {action_window->hide();
911 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
918 callback {action_window->hide();
919 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
926 callback {action_window->hide();
927 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));}
931 {fltk::Window} scope_window {
933 callback {ui->scope_button->state(0);
935 xywh {647 310 425 280} hide resizable
937 {fltk::TextDisplay} scope {
938 xywh {5 5 415 245} resizable textfont 4 color 0x280000 textcolor 0xff0000
939 extra_code {o->wrap_mode(1);}
941 {fltk::Group} {} {open
946 callback {if(o->state()){
953 extra_code {o->type(fltk::Button::TOGGLE);}
955 {fltk::InvisibleBox} {} {
956 xywh {45 0 95 20} resizable
960 code {loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
961 conf_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
962 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
963 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
964 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
966 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
967 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
968 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
969 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
970 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
972 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
973 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
974 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
975 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
976 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
977 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
978 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));} {}
979 code {track_info->set_rec(0);} {}
980 code {start_monitor();} {}
981 code {main_window->show();} {}