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 {31 41 640 480} resizable
66 extra_code {\#include <stdio.h>
68 \#include <fltk/ask.h>
71 \#include "trackmodule.h"
72 o->size_range(640,455);
73 o->resize(640,455);} visible
76 xywh {0 0 640 445} resizable
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();}
96 {fltk::Group} {} {open
99 {fltk::Widget} song_timeline {
101 xywh {0 0 370 15} resizable
102 extra_code {o->scale=16;
107 {fltk::Group} song_scrollgroup {
108 xywh {255 15 385 430} resizable
110 {fltk::Widget} arranger {
112 xywh {0 0 370 415} resizable box FLAT_BOX
113 extra_code {\#include "seq.h"
114 \#include "arranger.h"}
117 {fltk::Scrollbar} song_vscroll {
118 callback {int target = (int)o->value();
119 int dummy = ui->arranger->scrollx;
120 ui->arranger->scrollTo(dummy,target);}
121 xywh {370 0 15 415} slider_size 60
123 {fltk::ThumbWheel} song_hscroll {
124 callback {ui->arranger->scrollTo((int)o->value(),ui->arranger->scrolly);}
125 xywh {0 415 370 15} maximum 10000 step 10
129 {fltk::Group} pattern_edit {
130 xywh {0 0 640 445} hide
132 {fltk::Group} {} {open
133 xywh {45 0 595 445} resizable
138 {fltk::Widget} pattern_timeline {
140 xywh {0 0 580 15} resizable box FLAT_BOX
141 extra_code {\#include "timeline.h"
146 {fltk::Group} pattern_scrollgroup {open
147 xywh {0 15 595 355} resizable
149 {fltk::Widget} piano_roll {
151 xywh {0 0 580 340} resizable box FLAT_BOX
152 extra_code {\#include "pianoroll.h"}
155 {fltk::Scrollbar} pattern_vscroll {
156 callback {int target = (int)o->value();
157 int dummy = ui->piano_roll->scrollx;
158 ui->piano_roll->scrollTo(dummy,target);}
161 {fltk::ThumbWheel} pattern_hscroll {
162 callback {ui->piano_roll->scrollTo((int)o->value(),ui->piano_roll->scrolly);}
163 xywh {0 340 580 15} step 10
169 {fltk::Widget} event_edit {
171 xywh {0 0 580 75} resizable box FLAT_BOX
172 extra_code {\#include "eventedit.h"}
175 {fltk::Widget} event_menu {
176 xywh {0 0 580 75} hide box FLAT_BOX
177 extra_code {\#include "eventmenu.h"}
180 {fltk::Button} event_menu_button {
182 callback {if(o->state()==0){
183 ui->event_menu->hide();
184 ui->event_edit->show();
187 ui->event_edit->hide();
188 ui->event_edit->recount_has();
189 ui->event_menu->show();
191 tooltip {pick event type}
193 extra_code {o->type(fltk::Button::TOGGLE);}
197 callback {ui->event_edit->label_flag = o->state();
198 ui->event_edit->redraw();}
199 tooltip {toggle event value labels}
201 extra_code {o->type(fltk::Button::TOGGLE);}
205 callback {ui->event_edit->clear_events();}
206 tooltip {clear these events}
211 callback {ui->event_edit->clear_non_note_events();}
212 tooltip {clear all non note events in pattern}
217 callback {ui->event_edit->clear_all_events();}
218 tooltip {clear everything}
219 xywh {580 60 15 15} labelcolor 0xff000000
223 {fltk::Group} {} {open
224 xywh {0 0 45 445} horizontal
230 {fltk::Group} {} {open
231 xywh {0 15 45 340} resizable
233 {fltk::Widget} track_select {
236 extra_code {\#include "trackselect.h"}
239 {fltk::Widget} sample_view {
242 extra_code {\#include "sampleview.h"}
245 {fltk::Widget} keyboard {
248 extra_code {\#include "keyboard.h"}
254 callback {show_song_edit();}
260 {fltk::Group} {} {open
261 xywh {0 445 640 35} box UP_BOX
263 {fltk::Button} play_button {
265 callback {press_play();}
266 xywh {5 5 25 25} labelcolor 0x800000
268 {fltk::Button} stop_button {
270 callback {press_stop();}
271 xywh {35 5 25 25} labelcolor 0x800000
273 {fltk::Button} record_button {
275 callback {toggle_backend_recording();}
276 xywh {65 5 25 25} labelcolor 0xff000000
277 extra_code {o->type(fltk::Button::TOGGLE);}
279 {fltk::Widget} metronome {
281 xywh {95 5 25 25} color 56 labelcolor 0xffffff00
282 extra_code {\#include <metronome.h>}
285 {fltk::Button} loop_toggle {
286 callback {toggle_loop();}
287 tooltip {toggle looping}
289 extra_code {o->type(fltk::Button::TOGGLE);}
291 {fltk::Group} {} {open
292 xywh {155 0 20 35} resizable
294 {fltk::Group} pattern_buttons {
295 xywh {200 5 310 25} hide
297 {fltk::Button} quant1_button {
299 tooltip {quantize selected notes}
302 {fltk::Button} quant0_button {
304 tooltip {quantize length of selected notes}
307 {fltk::Button} tool_button {
309 callback {toggle_tool();}
312 {fltk::Button} qbutton4 {
313 callback {set_quant(4);}
315 extra_code {o->type(fltk::Button::TOGGLE);}
317 {fltk::Button} qbutton8 {
318 callback {set_quant(8);}
320 extra_code {o->type(fltk::Button::TOGGLE);}
322 {fltk::Button} qbutton16 {
323 callback {set_quant(16);}
325 extra_code {o->type(fltk::Button::TOGGLE);
328 {fltk::Button} qbutton32 {
329 callback {set_quant(32);}
331 extra_code {o->type(fltk::Button::TOGGLE);}
333 {fltk::Button} qbutton64 {
334 callback {set_quant(64);}
336 extra_code {o->type(fltk::Button::TOGGLE);}
338 {fltk::Button} qbutton128 {
339 callback {set_quant(128);}
341 extra_code {o->type(fltk::Button::TOGGLE);}
343 {fltk::Button} qbutton0 {
344 callback {set_quant(0);}
346 extra_code {o->type(fltk::Button::TOGGLE);}
349 {fltk::Group} song_buttons {open
352 {fltk::Button} edit_button {
353 callback {set_songtool(0);}
354 tooltip {create delete move resize select paste blocks}
355 xywh {0 0 25 25} value 1
357 {fltk::Button} color_button {
358 callback {set_songtool(1);}
361 extra_code {o->type(fltk::Button::TOGGLE);}
363 {fltk::Button} unclone_button {
364 callback {set_songtool(2);}
365 tooltip {click on blocks to unclone them}
367 extra_code {o->type(fltk::Button::TOGGLE);}
369 {fltk::Button} split_button {
370 callback {set_songtool(3);}
371 tooltip {click on a block to split in two}
373 extra_code {o->type(fltk::Button::TOGGLE);}
375 {fltk::Button} join_button {
376 callback {set_songtool(4);}
377 tooltip {click on adjacent blocks to join them}
379 extra_code {o->type(fltk::Button::TOGGLE);}
382 {fltk::Button} conf_button {
383 callback {if(o->state()){
384 ui->config_window->show();
387 ui->config_window->hide();
389 tooltip configuration
391 extra_code {o->type(fltk::Button::TOGGLE);}
393 {fltk::Button} scope_button {
394 callback {if(o->state()){
395 ui->scope_window->show();
398 ui->scope_window->hide();
402 extra_code {o->type(fltk::Button::TOGGLE);}
404 {fltk::Button} file_button {
405 callback {if(o->state()){
406 ui->action_window->show();
409 ui->action_window->hide();
413 extra_code {\#include "saveload.h"
414 o->type(fltk::Button::TOGGLE);}
416 {fltk::Button} help_button {
417 callback {if(o->state()){
418 ui->help_window->show();
421 ui->help_window->hide();
425 extra_code {o->type(fltk::Button::TOGGLE);}
429 {fltk::Window} config_window {
431 callback {ui->conf_button->state(0);
432 o->hide();} open selected
433 xywh {52 125 320 285} hide
435 {fltk::TabGroup} {} {open
440 xywh {145 15 170 265} horizontal
442 {fltk::ValueInput} beats_per_measure {
443 label {beats per measure}
444 callback {if(o->value() > o->maximum())
445 o->value(o->maximum());
446 if(o->value() < o->minimum())
447 o->value(o->minimum());
448 set_beats_per_measure((int)o->value());}
449 xywh {5 5 45 20} minimum 1 maximum 31 step 1 value 4
451 {fltk::ValueInput} measures_per_phrase {
452 label {measures per phrase}
453 callback {if(o->value() > o->maximum())
454 o->value(o->maximum());
455 if(o->value() < o->minimum())
456 o->value(o->minimum());
457 set_measures_per_phrase((int)o->value());}
458 xywh {5 30 45 20} maximum 128 step 1 value 4
460 {fltk::ValueOutput} bpm_output {
462 xywh {5 55 45 20} minimum 1 maximum 1000 step 1 value 120
464 {fltk::ThumbWheel} bpm_wheel {
465 callback {set_bpm((int)o->value());
466 ui->bpm_output->value(o->value());}
467 xywh {55 55 105 20} align 4 minimum 1 maximum 1000 step 1 value 120
469 {fltk::ValueInput} measures_until_record {
470 label {measures until record}
471 callback {if(o->value() > o->maximum())
472 o->value(o->maximum());
473 if(o->value() < o->minimum())
474 o->value(o->minimum());
475 set_measures_until_record((int)o->value());}
476 xywh {5 80 45 20} maximum 128 step 1 value 1
478 {fltk::CheckButton} check_alwayscopy {
479 label {always hard copy}
480 callback {set_alwayscopy(o->value());}
481 tooltip {instead of making a linked clone when you copy a block in the song view.}
482 xywh {5 105 25 25} align 4
484 {fltk::CheckButton} check_autotrackname {
485 label {auto track name}
486 callback {set_autotrackname(o->value());}
487 tooltip {Fill in GM instruments for track names when you change the program.}
488 xywh {145 105 25 25} align 4
490 {fltk::CheckButton} check_passthru {
491 label {record pass-thru}
492 callback {set_passthru(o->value());}
493 tooltip {Echo midi input to midi output.}
494 xywh {5 130 25 26} horizontal align 4 value 1
496 {fltk::CheckButton} check_playinsert {
497 label {play note insertion}
498 callback {set_playinsert(o->value());}
499 tooltip {Send midi note on when you create notes.}
500 xywh {145 130 25 26} horizontal align 4 value 1
502 {fltk::CheckButton} check_recordonchan {
503 label {record on channel}
504 callback {set_recordonchan(o->value());}
505 tooltip {Record on first track that matches channel of midi input instead of selected track.}
506 xywh {5 155 25 25} align 4
508 {fltk::CheckButton} check_playmove {
509 label {play note move}
510 callback {set_playmove(o->value());}
511 tooltip {Send midi note on when you move notes.}
512 xywh {145 155 25 26} horizontal align 4 value 1
514 {fltk::CheckButton} check_follow {
515 label {follow playback}
516 callback {set_follow(o->value());}
517 tooltip {Auto scroll horizontally when play head leaves viewing area.}
518 xywh {5 179 25 26} horizontal align 4 value 1
520 {fltk::ValueInput} default_velocity {
521 label {default velocity}
522 callback {if(o->value() > o->maximum())
523 o->value(o->maximum());
524 if(o->value() < o->minimum())
525 o->value(o->minimum());
526 set_defaultvelocity((int)o->value());}
527 xywh {120 180 45 20} maximum 127 step 1 value 96
529 {fltk::Choice} menu_recordmode {
530 label {record mode} open
535 callback {set_recordmode(0);}
539 callback {set_recordmode(1);}
543 callback {set_recordmode(2);}
546 {fltk::Choice} menu_rob {
547 label {record outside block} open
552 callback {set_robmode(0);}
556 callback {set_robmode(1);}
560 callback {set_robmode(2);}
566 xywh {0 15 320 270} hide
568 {fltk::Widget} kg_l0 {
570 xywh {35 5 45 15} align 4
573 {fltk::Widget} kg_l1 {
575 xywh {35 20 45 15} align 4
578 {fltk::Widget} kg_l2 {
580 xywh {35 35 45 15} align 4
583 {fltk::Widget} kg_l3 {
585 xywh {35 50 45 15} align 4
588 {fltk::Widget} kg_l4 {
590 xywh {35 65 45 15} align 4
593 {fltk::Widget} kg_l5 {
595 xywh {35 80 45 15} align 4
598 {fltk::Widget} kg_l6 {
600 xywh {35 95 45 15} align 4
603 {fltk::Widget} kg_l7 {
605 xywh {35 110 45 15} align 4
608 {fltk::Widget} kg_l8 {
610 xywh {35 125 45 15} align 4
613 {fltk::Widget} kg_l9 {
615 xywh {35 140 45 15} align 4
618 {fltk::Widget} kg_l10 {
621 xywh {35 155 45 15} align 4
624 {fltk::Widget} kg_l11 {
626 xywh {35 170 45 15} align 4
629 {fltk::Widget} kg_l12 {
631 xywh {35 185 45 15} align 4
634 {fltk::Widget} kg_l13 {
636 xywh {35 200 45 15} align 4
639 {fltk::Widget} kg_l14 {
641 xywh {35 215 45 15} align 4
644 {fltk::Widget} kg_l15 {
646 xywh {35 230 45 15} align 4
649 {fltk::Widget} kg_l16 {
651 xywh {35 245 45 15} align 4
654 {fltk::Widget} kg_u0 {
656 xywh {130 5 45 15} align 4
659 {fltk::Widget} kg_u1 {
661 xywh {130 20 45 15} align 4
664 {fltk::Widget} kg_u2 {
666 xywh {130 35 45 15} align 4
669 {fltk::Widget} kg_u3 {
671 xywh {130 50 45 15} align 4
674 {fltk::Widget} kg_u4 {
676 xywh {130 65 45 15} align 4
679 {fltk::Widget} kg_u5 {
681 xywh {130 80 45 15} align 4
684 {fltk::Widget} kg_u6 {
686 xywh {130 95 45 15} align 4
689 {fltk::Widget} kg_u7 {
691 xywh {130 110 45 15} align 4
694 {fltk::Widget} kg_u8 {
696 xywh {130 125 45 15} align 4
699 {fltk::Widget} kg_u9 {
701 xywh {130 140 45 15} align 4
704 {fltk::Widget} kg_u10 {
706 xywh {130 155 45 15} align 4
709 {fltk::Widget} kg_u11 {
711 xywh {130 170 45 15} align 4
714 {fltk::Widget} kg_u12 {
716 xywh {130 185 45 15} align 4
719 {fltk::Widget} kg_u13 {
721 xywh {130 200 45 15} align 4
724 {fltk::Widget} kg_u14 {
726 xywh {130 215 45 15} align 4
729 {fltk::Widget} kg_u15 {
731 xywh {130 230 45 15} align 4
734 {fltk::Widget} kg_u16 {
736 xywh {130 245 45 15} align 4
739 {fltk::Widget} kg_u17 {
741 xywh {265 5 45 15} align 4
744 {fltk::Widget} kg_u18 {
746 xywh {265 20 45 15} align 4
749 {fltk::Widget} kg_u19 {
751 xywh {265 35 45 15} align 4
754 {fltk::Widget} kg_u20 {
756 xywh {265 50 45 15} align 4
759 {fltk::Widget} kg_zi {
761 xywh {265 65 45 15} align 4
764 {fltk::Widget} kg_zo {
766 xywh {265 80 45 15} align 4
769 {fltk::Widget} kg_ou {
771 xywh {265 95 45 15} align 4
774 {fltk::Widget} kg_od {
776 xywh {265 110 45 15} align 4
782 xywh {0 15 320 270} hide
805 {fltk::Window} help_window {
807 callback {ui->help_button->state(0);
809 xywh {519 345 580 370} hide resizable
810 extra_code {o->size_range(580,370);}
812 {fltk::TabGroup} {} {open
817 xywh {0 25 580 345} resizable
819 {fltk::Input} title_text {
823 {fltk::Input} author_text {
827 {fltk::TextEditor} info_text {
828 xywh {5 55 570 285} resizable textfont 4
833 xywh {0 25 580 345} hide
835 {fltk::TextDisplay} {} {
836 xywh {5 5 570 335} resizable textfont 4
837 extra_code {load_text(o,ROOT_DATA_DIR"doc/controls.txt");}
842 xywh {0 25 580 345} hide
844 {fltk::TextDisplay} {} {
845 xywh {5 5 570 335} resizable textfont 4
846 extra_code {load_text(o,ROOT_DATA_DIR"doc/guide.txt");}
851 xywh {0 25 580 345} hide
853 {fltk::TextDisplay} {} {
854 xywh {5 5 570 335} resizable textfont 4
855 extra_code {load_text(o,ROOT_DATA_DIR"doc/license.txt");}
860 xywh {0 25 580 345} hide
862 {fltk::TextDisplay} {} {
863 xywh {5 5 570 335} resizable textfont 4
864 extra_code {load_text(o,ROOT_DATA_DIR"doc/README");}
869 {fltk::Window} action_window {
871 callback {ui->file_button->state(0);
873 xywh {286 302 100 130} horizontal hide
877 callback {reset_song();}
882 callback {action_window->hide();
888 callback {action_window->hide();
889 save(fltk::file_chooser("save file",NULL,get_last_dir()));}
894 callback {action_window->hide();
895 if(load(fltk::file_chooser("open file",NULL,get_last_dir()))<0){
902 callback {action_window->hide();
903 if(loadsmf(fltk::file_chooser("import file",NULL,get_last_dir()))<0){
910 callback {action_window->hide();
911 savesmf(fltk::file_chooser("export file",NULL,get_last_dir()));}
915 {fltk::Window} scope_window {
917 callback {ui->scope_button->state(0);
919 xywh {647 310 425 280} hide resizable
921 {fltk::TextDisplay} scope {
922 xywh {5 5 415 245} resizable textfont 4 color 0x280000 textcolor 0xff0000
923 extra_code {o->wrap_mode(1);}
925 {fltk::Group} {} {open
930 callback {if(o->state()){
937 extra_code {o->type(fltk::Button::TOGGLE);}
939 {fltk::InvisibleBox} {} {
940 xywh {45 0 95 20} resizable
944 code {loop_toggle->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/loop.gif"));
945 conf_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/conf.gif"));
946 scope_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/scope.gif"));
947 file_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/file.gif"));
948 help_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/help.gif"));
950 edit_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/edit.gif"));
951 color_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/color.gif"));
952 unclone_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/fork.gif"));
953 split_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/split.gif"));
954 join_button->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/join.gif"));
956 qbutton4->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q4.gif"));
957 qbutton8->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q8.gif"));
958 qbutton16->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q16.gif"));
959 qbutton32->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q32.gif"));
960 qbutton64->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q64.gif"));
961 qbutton128->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q128.gif"));
962 qbutton0->image(fltk::SharedImage::get(ROOT_DATA_DIR"gfx/q0.gif"));} {}
963 code {track_info->set_rec(0);} {}
964 code {start_monitor();} {}
965 code {main_window->show();} {}