aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/ui_recorder.fl
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/ui_recorder.fl')
-rw-r--r--src/frontend/ui_recorder.fl3639
1 files changed, 3639 insertions, 0 deletions
diff --git a/src/frontend/ui_recorder.fl b/src/frontend/ui_recorder.fl
new file mode 100644
index 0000000..f650f5f
--- /dev/null
+++ b/src/frontend/ui_recorder.fl
@@ -0,0 +1,3639 @@
1# data file for the Fltk User Interface Designer (fluid)
2version 1.0109
3header_name {.h}
4code_name {.cxx}
5decl {\#define RECORDERDEBUG 0} {public
6}
7
8decl {\#define MAXSAMRATE 48000} {public
9}
10
11decl {\#define AUDIOLIB_PORTAUDIO 1} {public
12}
13
14decl {\#define AUDIOLIB_JACK 2} {public
15}
16
17decl {\#define AUDIOLIB_SNDFILE 3} {public
18}
19
20decl {\#define Pi2 (2*3.1415926535897)} {public
21}
22
23decl {\#include <config.h>} {public
24}
25
26decl {\#include <string>} {public
27}
28
29decl {\#include <vector>} {public
30}
31
32decl {\#include <soundlibs.h>} {public
33}
34
35decl {\#include <iostream>} {public
36}
37
38decl {\#include <fstream>} {public
39}
40
41decl {\#include <FL/FLTKstuff.H>} {public
42}
43
44decl {\#include <FL/filename.H>} {public
45}
46
47decl {\#include <convertlib.h>} {public
48}
49
50decl {\#include <time.h>} {public
51}
52
53decl {\#include <math.h>} {public
54}
55
56decl {\#include <hd24fs.h>} {public
57}
58
59decl {\#include <ui_hd24connect.h>} {public
60}
61
62decl {\#include <ui_mixer.h>} {public
63}
64
65decl {class MixerControl;} {public
66}
67
68decl {\#include <sharedlibs.h>} {public
69}
70
71decl {class RecorderChannelData;} {public
72}
73
74decl {class RecorderChannelControl;} {public
75}
76
77decl {class RecorderChannelUI;} {public
78}
79
80decl {class RecorderData;} {public
81}
82
83decl {class RecorderControl;} {public
84}
85
86decl {class RecorderUI;} {public
87}
88
89class ScrubWheel {: {public Fl_Roller}
90} {
91 decl {int myval;} {}
92 decl {RecorderUI* ui;} {}
93 decl {int lastx;} {}
94 Function {handle(int e)} {open return_type int
95 } {
96 code {/*char *fltk_eventnames[] =
97{
98 "FL_NO_EVENT",
99 "FL_PUSH",
100 "FL_RELEASE",
101 "FL_ENTER",
102 "FL_LEAVE",
103 "FL_DRAG",
104 "FL_FOCUS",
105 "FL_UNFOCUS",
106 "FL_KEYDOWN",
107 "FL_KEYUP",
108 "FL_CLOSE",
109 "FL_MOVE",
110 "FL_SHORTCUT",
111 "FL_DEACTIVATE",
112 "FL_ACTIVATE",
113 "FL_HIDE",
114 "FL_SHOW",
115 "FL_PASTE",
116 "FL_SELECTIONCLEAR",
117 "FL_MOUSEWHEEL",
118 "FL_DND_ENTER",
119 "FL_DND_DRAG",
120 "FL_DND_LEAVE",
121 "FL_DND_RELEASE",
122};
123
124*/
125if (e==FL_DRAG) {
126 myval=Fl::event_x()-lastx;
127 RecorderControl::button_scrub_call(myval,this->ui->control);
128}
129lastx=Fl::event_x();
130return 1;} {}
131 }
132 Function {ScrubWheel(int a,int b,int c,int d,const char* e):Fl_Roller(a,b,c,d,e)} {open
133 } {
134 code {myval=0;} {}
135 }
136 Function {draw()} {open
137 } {
138 code {//draw goes here
139return Fl_Roller::draw();} {}
140 }
141 Function {value()} {open return_type int
142 } {
143 code {return this->myval;} {}
144 }
145 Function {value(int newval)} {open return_type int
146 } {
147 code {int oldval=this->myval;
148this->myval=newval; // not very useful but whatever
149return oldval;} {}
150 }
151 Function {setui(RecorderUI* p_ui)} {open
152 } {
153 code {this->ui=p_ui;} {}
154 }
155}
156
157class AudioSystem {open
158} {
159 decl {AudioStorage* tape;} {}
160 decl {__uint32 samrate;} {public
161 }
162 decl {bool closingdown;} {public
163 }
164 decl {MixerControl* mixercontrol;} {}
165 decl {RecorderControl* recorder;} {}
166 decl {PortAudioWrapper* portaudio;} {public
167 }
168 decl {SoundFileWrapper* soundfile;} {public
169 }
170 decl {JackWrapper* libjack;} {}
171 decl {PaStreamParameters* inputParameters;} {}
172 decl {PaStreamParameters* outputParameters;} {}
173 decl {PaStream* portaudiostream;} {}
174 decl {jack_client_t *jackclient;} {}
175 decl {__uint32 jackrate;} {}
176 decl {__uint32 portaudiooffset;} {public
177 }
178 decl {int as_initialized;} {}
179 decl {int portaudio_initialized;} {}
180 decl {int jack_initialized;} {}
181 decl {int as_looppos;} {}
182 decl {bool as_mustloop;} {}
183 decl {jack_port_t *output_port[24];} {}
184 decl {jack_port_t *output_master[2];} {}
185 decl {jack_port_t *input_port[24];} {}
186 decl {long* mtsample;} {}
187 decl {bool havestreamtime;} {}
188 decl {__sint64 streamtime;} {public
189 }
190 Function {AudioSystem(RecorderControl* rec)} {open
191 } {
192 code {\#if (RECORDERDEBUG==1)
193cout << "AudioSystem::AudioSystem()" << endl;
194\#endif
195initvars(rec);} {}
196 }
197 Function {initvars(RecorderControl* rec)} {open return_type void
198 } {
199 code {this->tape=NULL;
200this->samrate=0;
201this->closingdown=false;
202this->mixercontrol=NULL;
203this->recorder=rec;
204this->portaudio=NULL;
205this->soundfile=NULL;
206this->libjack=NULL;
207this->jackclient=NULL;
208this->portaudiostream=NULL;
209this->portaudio_initialized=0;
210this->as_initialized=false;
211this->jack_initialized=false;
212this->as_looppos=0;
213this->as_mustloop=false;
214this->inputParameters=NULL;
215this->outputParameters=NULL;
216this->inputParameters=new PaStreamParameters;
217this->outputParameters=new PaStreamParameters;
218this->mtsample=NULL;
219for (int i=0;i<24;i++) {
220 this->output_port[i]=NULL;
221 this->input_port[i]=NULL;
222}
223this->output_master[0]=NULL;
224this->output_master[1]=NULL;
225this->havestreamtime=false;} {}
226 }
227 Function {currentlocation(__uint32 newpos)} {open return_type void
228 } {
229 code {if (tape==NULL) return;
230tape->currentlocation(newpos);} {}
231 }
232 Function {currentlocation()} {return_type __uint32
233 } {
234 code {if (tape==NULL) return 0;
235return tape->currentlocation();} {}
236 }
237 Function {jack_process(jack_nframes_t nframes, void *arg)} {open private return_type {static int}
238 } {
239 code {\#ifndef LIBJACK
240\#if (RECORDERDEBUG==1)
241cout << "no libjack" << endl;
242\#endif
243\#endif
244
245\#ifdef LIBJACK
246
247RecorderControl* recordercontrol=(RecorderControl*)arg;
248
249if (recordercontrol==NULL) {
250 cout << "no control" << endl;
251 return 0;
252}
253AudioSystem* audio=recordercontrol->audio;
254if (audio==NULL)
255{
256 cout << "no audiosys" << endl;
257 return 0;
258}
259if ((audio->libjack)==NULL)
260{
261\#if (RECORDERDEBUG==1)
262cout << "no libjack" << endl;
263\#endif
264 return 0;
265}
266
267if (!(audio->libjack->libloaded))
268{
269 cout << "no jacklib" << endl;
270 return 0;
271}
272
273RecorderControl* mythis=recordercontrol;
274//RecorderUI* mythis=recordercontrol; //(RecorderUI*)arg;
275//AudioSystem* audio=mythis->control->audio;
276
277
278jack_client_t* currjackclient=audio->jackclient;
279if (currjackclient==NULL) return 0;
280MixerControl* mixer=audio->mixer();
281if (mixer==NULL) return 0;
282jack_position_t current;
283jack_transport_state_t transport_state=audio->libjack->jack_transport_query(currjackclient,&current);
284
285hd24song* mysong=(hd24song*)audio->tape;
286if (mysong==NULL) return 0; /* nothing to do! */
287
288hd24fs* myfs=mysong->fs();
289
290__sint64 frame_time = (__sint64)(audio->libjack->jack_get_current_transport_frame(currjackclient));
291
292MixerChannelControl* mixerchannel[24];
293
294
295for (unsigned int tracknum=0;tracknum<MAXCHANNELS;tracknum++)
296{
297 mixerchannel[tracknum]=mixer->parentui()->mixerchannel[tracknum]->control;
298}
299
300unsigned int i;
301__sint64 intsamval=0;
302mysong->golocatepos(frame_time);
303int jumpedloop=0;
304if (transport_state!=JackTransportStopped)
305{
306 __sint64 frpos=frame_time;
307 __sint64 posoffset=0;
308 for (i=0;i<nframes;i++)
309 {
310 if ( mythis->loopmode()==1 )
311 {
312 posoffset++;
313 if ((frpos+i)==(__sint64)(mysong->getlocatepos(hd24song::LOCATEPOS_LOOPEND)))
314 {
315 frpos=mysong->getlocatepos(hd24song::LOCATEPOS_LOOPSTART);
316 mysong->golocatepos(frpos);
317 posoffset=0;
318 jumpedloop=1;
319 }
320 }
321
322 mysong->getmultitracksample(
323 (long*)((&audio->mtsample[i*25])),
324 hd24song::READMODE_REALTIME
325 );
326 }
327 if (jumpedloop==1)
328 {
329 audio->hd24_transport_locate((__sint64)(frpos+posoffset));
330 }
331}
332
333for (unsigned int tracknum=0;tracknum<MAXCHANNELS;tracknum++)
334{
335 jack_default_audio_sample_t *out =
336 (jack_default_audio_sample_t *)(audio->libjack->jack_port_get_buffer (audio->output_port[tracknum], nframes));
337 jack_default_audio_sample_t *in =
338 (jack_default_audio_sample_t *)(audio->libjack->jack_port_get_buffer (audio->input_port[tracknum], nframes));
339 for (i=0;i<nframes;i++)
340 {
341 if (transport_state!=JackTransportStopped) {
342 long* xb=(long*)(&(audio->mtsample[i*25+tracknum]));
343 intsamval=xb[0];
344 intsamval=((intsamval>>16)+((intsamval%256)<<16)+(intsamval & 0xff00));
345 if (intsamval>=(1<<23)) {
346 intsamval-=(1<<24);
347 }
348 double samval=(intsamval/(double)0x800000);
349 out[i]=samval; // send pre-fader, pre-mixer channel output to JACK
350 } else {
351 out[i]=0;
352 }
353
354 mixerchannel[tracknum]->sample(i,out[i]);
355
356 // ... except if we are monitoring input, in which case regular reading etc is
357 // still going on, but we will just copy the incoming signal to the output:
358 // (with the possible exception of tracks being recorded but that's for later)
359 if (myfs->isallinput()) {
360 out[i]=in[i];
361 }
362
363 if (fabs(out[i]) > mythis->data->trackpeak[i]) {
364 mythis->data->trackpeak[tracknum]=fabs(out[i]);
365 }
366 }
367}
368mixer->mix(nframes);
369jack_default_audio_sample_t *masterL =
370(jack_default_audio_sample_t *)(audio->libjack->jack_port_get_buffer (audio->output_master[0], nframes));
371jack_default_audio_sample_t *masterR =
372(jack_default_audio_sample_t *)(audio->libjack->jack_port_get_buffer (audio->output_master[1], nframes));
373if ((masterL!=NULL)&&(masterR!=NULL)) {
374 for (i=0;i<nframes;i++)
375 {
376 masterL[i] = mixer->masterout(0,i); // left
377 masterR[i] = mixer->masterout(1,i); // right
378 }
379}
380\#endif
381
382return 0;} {}
383 }
384 Function {jack_shutdown(void *arg)} {private return_type {static void}
385 } {
386 code {\#ifdef LIBJACK
387AudioSystem* audio=(AudioSystem*)arg;
388if (audio->jackclient==NULL) {
389 return;
390}
391if (audio->mtsample!=NULL) {
392 memutils::myfree("jack_shutdown",audio->mtsample);
393 audio->mtsample=NULL;
394}
395audio->jackclient=NULL;
396return;
397\#endif} {}
398 }
399 Function {jackinit()} {open private return_type void
400 } {
401 code {if (portaudio_initialized==1)
402{
403\#if (RECORDERDEBUG==1)
404 cout << "not initializing jack because portaudio is active" << endl;
405\#endif
406 return;
407}
408if (!(libjack->libloaded))
409{
410\#if (RECORDERDEBUG==1)
411 cout << "not initializing jack because its lib is not loaded" << endl;
412\#endif
413 return;
414}
415if (this->closingdown) {
416 if (jackclient!=NULL)
417 {
418 jack_shutdown(this);
419 }
420 jackclient=NULL;
421 return;
422}
423\#ifdef LIBJACK
424//button_setlocate->value(0);
425//highlight_setbuttons(0); // value of setlocate button
426//mustdisplaytimer=true;
427if (jackclient==NULL) {
428 jackclient = libjack->jack_client_new("HD24connect");
429
430 if (jackclient == NULL) {
431 // error: jack open failed.
432\#if (RECORDERDEBUG==1)
433 cout << "error: jack open failed." << endl;
434\#endif
435 return;
436 }
437 mtsample=(long *)memutils::mymalloc("jackinit",512000,1);
438
439 libjack->jack_set_process_callback (
440 jackclient,
441 (int (*)(jack_nframes_t, void*))jack_process,
442 recorder); // was: this (=audiosystem)
443 libjack->jack_on_shutdown (jackclient, jack_shutdown, this);
444 jackrate=libjack->jack_get_sample_rate (jackclient);
445 int i;
446 for (i=1;i<=MAXCHANNELS;i++) {
447 string portnameout="output";
448 string portnamein="input";
449
450 string* tracknum=Convert::int2str(i);
451 portnameout+=*tracknum;
452 portnamein+=*tracknum;
453 delete(tracknum);
454
455 output_port[i-1]=libjack->jack_port_register (jackclient, portnameout.c_str(), JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
456 input_port[i-1]=libjack->jack_port_register (jackclient, portnamein.c_str(), JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
457 }
458 string portnameout="master_out_L";
459 output_master[0]=libjack->jack_port_register (jackclient, portnameout.c_str(), JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
460 portnameout="master_out_R";
461 output_master[1]=libjack->jack_port_register (jackclient, portnameout.c_str(), JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
462 if (libjack->jack_activate(jackclient)) {
463\#if (RECORDERDEBUG==1)
464 cout << "cannot activate jack client" << endl;
465\#endif
466 };
467}
468\#endif} {}
469 }
470 Function {isjackinitialized()} {open private return_type bool
471 } {
472 code {if (this->jackclient!=NULL)
473{
474 return true;
475}
476return false;} {}
477 }
478 Function {portaudioinit()} {open private return_type void
479 } {
480 code {\#ifndef LIBPORTAUDIO
481return;
482\#endif
483\#ifdef LIBPORTAUDIO
484//if (currsong==NULL) return;
485//\#if (RECORDERDEBUG==1)
486//cout << "Init portaudio" << endl;
487//\#endif
488//mustdisplaytimer=true;
489PaError err;
490err=(*(portaudio->Pa_Initialize))();
491if (err!=paNoError) {
492 this->portaudiostream=NULL;
493 (*(portaudio->Pa_Terminate))(); return;
494\#if (RECORDERDEBUG==1)
495cout << "Error during init portaudio" << endl;
496\#endif
497}
498this->mustloop(false);
499this->as_looppos=0;
500this->portaudio_initialized=1;
501this->as_initialized=1;
502\#endif} {}
503 }
504 Function {isportaudioinitialized()} {open private return_type bool
505 } {
506 code {if (!(portaudio->libloaded)) {
507return false;
508}
509if (portaudiostream!=NULL) {
510 return true;
511}
512if (portaudio_initialized!=0) {
513 return true;
514}
515return false;} {}
516 }
517 Function {portaudio_process(const void *inputBuffer, void *outputBuffer, __uint32 nframes, const PaStreamCallbackTimeInfo* timeinfo,PaStreamCallbackFlags, void *userData)} {open private return_type {static int}
518 } {
519 code {RecorderControl* recordercontrol=(RecorderControl*)userData;
520
521if (recordercontrol==NULL) {
522 cout << "no control" << endl;
523 return 0;
524}
525AudioSystem* audio=recordercontrol->audio;
526if (audio==NULL)
527{
528 cout << "no audiosys" << endl;
529 return 0;
530}
531if (audio->portaudio==NULL)
532{
533 cout << "no portaudio" << endl;
534 return 0;
535}
536if (!(audio->portaudio->libloaded))
537{
538 cout << "no palib" << endl;
539 return 0;
540}
541if (!audio->havestreamtime)
542{
543 audio->streamtime=0;
544 audio->havestreamtime=true;
545}
546
547float samleft=0;
548float samright=0;
549
550//hd24fs* myfs=mythis->currenthd24;
551
552PaStream* curr_pa_stream=audio->portaudiostream;
553
554if (curr_pa_stream==NULL)
555{
556 cout << "no stream" << endl;
557 return paContinue;
558}
559if ((audio->mtsample)==NULL)
560{
561 cout << "no sample" << endl;
562 return paContinue;
563}
564
565// TODO: connect audio system to mixer
566MixerControl* mixer=audio->mixer();
567if (mixer==NULL)
568{
569 cout << "no mixer" << endl;
570 return paContinue;
571}
572
573if (audio->mustloop())
574{
575 cout << "must loop" << endl;
576 return paContinue;
577}
578
579hd24song* mysong=recordercontrol->song();
580if (mysong == NULL)
581{
582 cout << "no song" << endl;
583 return 0;//nothing to do!
584}
585
586unsigned int tottracks=(unsigned int)mysong->logical_channels();
587
588/* frame time indicates how long the stream has been playing
589 and is reset to 0 after pressing stop/play.
590 To compensate for this, we must add our portaudio-offset,
591 the offset of the songcursor when we pressed 'play'.
592 We then record the absolute stream time in pa_streamtime. */
593__sint64 frame_time = audio->streamtime;
594frame_time+=audio->portaudiooffset;
595//audio->streamtime=frame_time;
596audio->streamtime+=nframes;
597MixerChannelControl* mixerchannel[24];
598
599unsigned int i;
600__sint64 intsamval=0;
601
602mysong->golocatepos(frame_time);
603int loopmode=recordercontrol->loopmode();
604int jumpedloop=0;
605
606 __sint64 frpos=frame_time;
607 __sint64 posoffset=0;
608 for (i=0;i<nframes;i++)
609 {
610 if ( loopmode==1 )
611 {
612 posoffset++;
613 if ((frpos+i)==(__sint64)(mysong->getlocatepos(hd24song::LOCATEPOS_LOOPEND)))
614 {
615 frpos=mysong->getlocatepos(hd24song::LOCATEPOS_LOOPSTART);
616 mysong->golocatepos(frpos);
617 posoffset=0;
618 jumpedloop=1;
619 }
620 }
621
622 mysong->getmultitracksample(
623 (long*)((&audio->mtsample[i*25])),
624 hd24song::READMODE_REALTIME
625 );
626 // if sample rate is high speed, skip next sample.
627 if ((mysong->physical_channels()/mysong->logical_channels())==2)
628 {
629 mysong->getmultitracksample(
630 (long*)((&audio->mtsample[i*25])),
631 hd24song::READMODE_REALTIME
632 );
633 }
634 }
635 if (jumpedloop==1)
636 {
637 audio->as_looppos=frpos+posoffset;
638 audio->mustloop(true);
639 }
640
641
642
643 for (unsigned int tracknum=0;tracknum<MAXCHANNELS;tracknum++)
644 {
645 mixerchannel[tracknum]=mixer->parentui()->mixerchannel[tracknum]->control;
646 }
647
648 for (unsigned int tracknum=0;tracknum<tottracks;tracknum++)
649 {
650 recordercontrol->data->trackpeak[tracknum]=0;
651 }
652
653
654 for (i=0;i<nframes;i++)
655 {
656 double samvaltot=0;
657 if (inputBuffer!=NULL) {
658 samleft=((float*)inputBuffer)[i*2];
659 samright=((float*)inputBuffer)[i*2+1];
660 } else {
661 samleft=0;
662 samright=0;
663 }
664 // depending on input mode, mix these to mono, set right to be equal to
665 // left, swap them or set left to be equal to right.
666 float subsamval;
667 for (unsigned int tracknum=0;tracknum<tottracks;tracknum++)
668 {
669 long* xb=(long*)(&(audio->mtsample[i*25+tracknum]));
670 intsamval=xb[0];
671 intsamval=((intsamval>>16)+((intsamval%256)<<16)+(intsamval & 0xff00));
672 if (intsamval>=(1<<23)) {
673 intsamval-=(1<<24);
674 }
675
676
677 if (mysong->istrackmonitoringinput(tracknum+1))
678 {
679 subsamval=((tracknum%2)==0)?(samleft):(samright);
680 }
681 else
682 {
683 subsamval=(intsamval/(double)0x800000);
684 }
685 samvaltot+=subsamval;
686 if (fabs(subsamval) > recordercontrol->data->trackpeak[tracknum]) {
687 recordercontrol->data->trackpeak[tracknum]=fabs(subsamval);
688 }
689
690 mixerchannel[tracknum]->sample(i,subsamval);
691
692 }
693 if (tottracks<24) {
694 for (unsigned int tracknum=tottracks;tracknum<MAXCHANNELS;tracknum++) {
695 mixerchannel[tracknum]->sample(i,0);
696 }
697 }
698 /*
699 if (outputBuffer!=NULL) {
700 ((float*)outputBuffer)[i*2] = samval; // left
701 ((float*)outputBuffer)[i*2+1] = samval; // right
702 }*/
703
704 }
705 mixer->mix(nframes);
706
707 if (outputBuffer!=NULL) {
708
709 for (i=0;i<nframes;i++)
710 {
711 ((float*)outputBuffer)[i*2] = mixer->masterout(0,i); // left
712 ((float*)outputBuffer)[i*2+1] = mixer->masterout(1,i); // right
713 }
714 }
715
716// cout << mythis->trackpeak[0] << endl;
717
718return 0;} {}
719 }
720 Function {portaudio_transport_start()} {open private return_type void
721 } {
722 code {if (!(portaudio->libloaded)) {
723return;
724}
725
726\#if (RECORDERDEBUG==1)
727cout << "portaudio transport start" << endl;
728\#endif
729if (!isportaudioinitialized())
730{
731 PaError err=(*(portaudio->Pa_Initialize))();
732 if (err != paNoError)
733 {
734\#if (RECORDERDEBUG==1)
735 cout << "Cannot initialize portaudio- exiting." << endl;
736\#endif
737
738 }
739}
740if (isportaudioinitialized() && (portaudiostream!=NULL)) {
741\#if (RECORDERDEBUG==1)
742cout << "already have stream- done starting" << endl;
743\#endif
744 return;
745}
746this->mustloop(false);
747
748this->as_looppos=0;
749PaDeviceIndex indev=(*(portaudio->Pa_GetDefaultInputDevice))();
750PaDeviceIndex outdev=(*(portaudio->Pa_GetDefaultOutputDevice))();
751cout << "default input device="<<indev<< endl;
752cout << "default output device="<<outdev<<endl;
753
754if (inputParameters!=NULL)
755{
756 memset(inputParameters,'\\0',sizeof(*inputParameters));
757}
758
759inputParameters->channelCount=2;
760inputParameters->sampleFormat=paFloat32;
761inputParameters->device=indev;
762inputParameters->suggestedLatency = (*(portaudio->Pa_GetDeviceInfo))( inputParameters->device )->defaultLowInputLatency;
763inputParameters->hostApiSpecificStreamInfo = NULL;
764\#if (RECORDERDEBUG==1)
765cout << "Input params set" << endl;
766cout << "Device=" << indev << endl;
767cout << "Channelcount=" << inputParameters->channelCount << endl;
768cout << "sampleFormat=" << inputParameters->sampleFormat << endl;
769cout << "suggestedlatency=" << inputParameters->suggestedLatency << endl;
770
771\#endif
772if (outputParameters!=NULL)
773{
774 memset(outputParameters,'\\0',sizeof(*outputParameters));
775}
776
777outputParameters->channelCount=2;
778outputParameters->sampleFormat=paFloat32;
779outputParameters->device=outdev;
780outputParameters->suggestedLatency = (*(portaudio->Pa_GetDeviceInfo))( outputParameters->device )->defaultLowOutputLatency;
781outputParameters->hostApiSpecificStreamInfo = NULL;
782\#if (RECORDERDEBUG==1)
783cout << "Output params set" << endl;
784\#endif
785cout << "Device=" << outdev << endl;
786cout << "Channelcount=" << outputParameters->channelCount << endl;
787cout << "sampleFormat=" << outputParameters->sampleFormat << endl;
788cout << "suggestedlatency=" << outputParameters->suggestedLatency << endl;
789
790if (mtsample==NULL)
791{
792 mtsample=(long *)memutils::mymalloc("portaudio_transport_start",512000,sizeof(long));
793}
794
795double playbackrate=this->samplerate();
796cout << "trying samrate="<<samrate<<endl;
797cout << "framesperbuf=" << PA_FRAMESPERBUF << endl;
798
799PaError err=(*(portaudio->Pa_OpenStream))(
800 &portaudiostream,
801 NULL,/*this->inputParameters,*/
802 this->outputParameters,
803 playbackrate,
804 PA_FRAMESPERBUF, /* frames per buffer */
805 paClipOff | paDitherOff,
806 portaudio_process,
807 (void*)recorder);
808this->havestreamtime=false;
809this->streamtime=0;
810
811if (err!=paNoError) {
812\#if (RECORDERDEBUG==1)
813cout << "Error opening stream" << endl;
814cout << portaudio->Pa_GetErrorText(err) << endl;
815cout << "playbackrate=" << playbackrate << endl;
816\#endif
817 (*(portaudio->Pa_Terminate))();
818 return;
819}
820\#if (RECORDERDEBUG==1)
821cout << "Stream opened, going to start it now..." << endl;
822\#endif
823err=(*(portaudio->Pa_StartStream))(portaudiostream);
824if (err!=paNoError) {
825\#if (RECORDERDEBUG==1)
826cout << "Error starting stream" << endl;
827cout << portaudio->Pa_GetErrorText(err) << endl;
828\#endif
829 (*(portaudio->Pa_Terminate))();
830 return;
831}
832\#if (RECORDERDEBUG==1)
833cout << "Stream started" << endl;
834\#endif
835
836
837return;} {}
838 }
839 Function {stopPAstream()} {open private return_type void
840 } {
841 code {// only to be called by portaudio_transport_stop
842if (portaudiostream==NULL) return;
843PaStream* pstream=portaudiostream;
844portaudiostream=NULL;
845
846PaError err = (*(portaudio->Pa_StopStream))( pstream );
847
848if (err!=paNoError) {
849 cout << portaudio->Pa_GetErrorText(err) << endl;
850}
851
852err = (*(portaudio->Pa_CloseStream))( pstream );
853
854if (err!=paNoError) {
855 cout << portaudio->Pa_GetErrorText(err) << endl;
856}
857
858(*(portaudio->Pa_Terminate))();} {}
859 }
860 Function {portaudio_transport_stop()} {open private return_type void
861 } {
862 code {if (portaudio==NULL) return;
863if (!(portaudio->libloaded)) return;
864
865\#if (RECORDERDEBUG==1)
866cout << "portaudio transport stop" << endl;
867\#endif
868// TODO: only stop stream if not monitoring input.
869stopPAstream();
870portaudio_initialized=0;
871portaudiostream=NULL;
872portaudiooffset+=streamtime;
873cout << "portaudiooffset at stop=" << portaudiooffset << endl;
874if (mtsample!=NULL)
875{
876 memutils::myfree("portaudio_transport_stop",mtsample);
877 mtsample=NULL;
878}} {}
879 }
880 Function {hd24_transport_goloc(__uint32 frames)} {open return_type void
881 } {
882 code {if (libjack!=NULL)
883{
884 if (libjack->libloaded) {
885 if (portaudio_initialized!=1) {
886
887 jackinit();
888 if (jackclient!=NULL) {
889 hd24_transport_locate((__sint64)frames);
890 return;
891 }
892 }
893 }
894}
895
896if (portaudio!=NULL)
897{
898 if (portaudio->libloaded)
899 {
900 hd24_transport_locate((__sint64)frames);
901 return;
902 }
903}} {}
904 }
905 Function {hd24_transport_locate(__sint64 i)} {open return_type void
906 } {
907 code {cout << "Request to transport locate to " << i << endl;
908if (i<0) i=0;
909if (libjack!=NULL)
910{
911 if (libjack->libloaded) {
912 cout << "try jackinit" << endl;
913 jackinit();
914 if (jackclient!=NULL) {
915 libjack->jack_transport_locate(jackclient,i);
916 return;
917 }
918 }
919 cout << "Jack locate attempt inconclusive, will try portaudio if available" << endl;
920}
921
922if (portaudio!=NULL)
923{
924 if (portaudio->libloaded) {
925 cout << "will have to do portaudio locate." << endl;
926 bool streamwasinitialized=true;
927 if (!(isportaudioinitialized()))
928 {
929 cout << "No previous stream, init a new one "<< endl;
930 streamwasinitialized=false;
931 if (tape==NULL)
932 {
933 return;
934 }
935
936 tape->currentlocation((i < 0) ? 0 : i);
937 cout << "set location to " << i << endl;
938 portaudiooffset=i; // still ok even without active stream
939 streamtime=i;
940 cout << "set portaudiooffset, streamtime to " << i << endl;
941 return; // <-- see if this does the trick- no previous
942 // stream, no new one.
943 }
944
945 PaError err;
946 if (portaudiostream!=NULL)
947 {
948 cout << "Still have a stream that needs stopping first." << endl;
949 err = (*(portaudio->Pa_StopStream))( portaudiostream );
950 if (err!=paNoError)
951 {
952 // maybe another program owns the stream.
953 cout << portaudio->Pa_GetErrorText(err) << endl;
954 }
955
956 PaStream* oldportaudiostream=portaudiostream;
957 portaudiostream=NULL;
958 err = (*(portaudio->Pa_CloseStream))( oldportaudiostream );
959 }
960
961 portaudiooffset=i; // still ok even without active stream
962 streamtime=i; // old portaudio V18 legacy
963
964 bool streamnolongerinitialized=false;
965 if (!(isportaudioinitialized()))
966 {
967 if (streamwasinitialized)
968 {
969 streamnolongerinitialized=true;
970 }
971 }
972
973 if (streamnolongerinitialized)
974 {
975 /* if closing stream means no longer initialized,
976 do not open another because we are not playing back
977 anything at the moment. */
978 return;
979 }
980 cout << "open a fresh stream" << endl;
981
982 PaDeviceIndex indev=(*(portaudio->Pa_GetDefaultInputDevice))();
983 PaDeviceIndex outdev=(*(portaudio->Pa_GetDefaultOutputDevice))();
984 if (inputParameters!=NULL)
985 {
986 memset(inputParameters,'\\0',sizeof(*inputParameters));
987
988 this->inputParameters->device=indev;
989 this->inputParameters->channelCount=2;
990 this->inputParameters->sampleFormat=paFloat32;
991 void* devinfo=(void*)(*(portaudio->Pa_GetDeviceInfo))( inputParameters->device );
992 if (devinfo!=NULL)
993 {
994 this->inputParameters->suggestedLatency = (*(portaudio->Pa_GetDeviceInfo))( inputParameters->device )->defaultLowInputLatency;
995 }
996 this->inputParameters->hostApiSpecificStreamInfo = NULL;
997 }
998 if (outputParameters!=NULL)
999 {
1000 memset(outputParameters,'\\0',sizeof(*outputParameters));
1001 this->outputParameters->device=outdev;
1002 this->outputParameters->channelCount=2;
1003 this->outputParameters->sampleFormat=paFloat32;
1004 void* devinfo=(void*)(*(portaudio->Pa_GetDeviceInfo))( outputParameters->device );
1005 if (devinfo!=NULL)
1006 {
1007 this->outputParameters->suggestedLatency = (*(portaudio->Pa_GetDeviceInfo))( outputParameters->device )->defaultLowOutputLatency;
1008 }
1009 this->outputParameters->hostApiSpecificStreamInfo = NULL;
1010 }
1011
1012 double samrate=this->samplerate();
1013 cout << " sample rate for new stream is " << samrate << endl;
1014 if (samrate==0)
1015 {
1016 return;
1017 }
1018
1019 err=(*(portaudio->Pa_OpenStream))(
1020 &portaudiostream,
1021 NULL,/*this->inputParameters,*/
1022 this->outputParameters,
1023 samrate,
1024 PA_FRAMESPERBUF, /* frames per buffer */
1025 paClipOff | paDitherOff,
1026 portaudio_process,
1027 this->recorder);
1028 this->havestreamtime=false;
1029 this->streamtime=0;
1030
1031 if (err!=paNoError) {
1032 cout << portaudio->Pa_GetErrorText(err) << endl;
1033 }
1034 if (err!=paNoError) { (*( portaudio->Pa_Terminate))(); return; }
1035
1036
1037 err=(*(portaudio->Pa_StartStream))(portaudiostream);
1038 if (err!=paNoError) {
1039 cout << portaudio->Pa_GetErrorText(err) << endl;
1040 }
1041 cout << "stream appears to have started successfully" << endl;
1042
1043 return;
1044 }
1045}} {}
1046 }
1047 Function {hd24_transport_locate(__uint32 i)} {open return_type void
1048 } {
1049 code {this->hd24_transport_locate((__sint64)i);} {}
1050 }
1051 Function {hd24_transport_start()} {open return_type void
1052 } {
1053 code {if (libjack!=NULL)
1054{
1055 if (libjack->libloaded) {
1056 jackinit();
1057 if (jackclient!=NULL) {
1058 libjack->jack_transport_start(jackclient);
1059 return;
1060 }
1061 }
1062}
1063
1064if (portaudio!=NULL)
1065{
1066 if (portaudio->libloaded)
1067 {
1068 if (!(isportaudioinitialized()))
1069 {
1070 portaudioinit();
1071 }
1072 if (isportaudioinitialized())
1073 {
1074 portaudio_transport_start();
1075 return;
1076 }
1077 }
1078}} {}
1079 }
1080 Function {hd24_transport_stop()} {open return_type void
1081 } {
1082 code {if (recorder!=NULL)
1083{
1084 recorder->resetpeaks();
1085}
1086
1087if (libjack!=NULL)
1088{
1089 if (libjack->libloaded)
1090 {
1091 jackinit();
1092 if (jackclient!=NULL)
1093 {
1094 libjack->jack_transport_stop(jackclient);
1095 return;
1096 }
1097 }
1098}
1099
1100if (portaudio!=NULL)
1101{
1102 if (portaudio->libloaded)
1103 {
1104 if (!(isportaudioinitialized()))
1105 {
1106 portaudioinit();
1107 }
1108 if (isportaudioinitialized())
1109 {
1110 portaudio_transport_stop();
1111 return;
1112 }
1113 }
1114}} {}
1115 }
1116 Function {hd24_transport_ffwd(long int frames)} {open return_type void
1117 } {
1118 code {if (portaudio_initialized!=1)
1119{
1120 if (libjack!=NULL)
1121 {
1122 if (libjack->libloaded)
1123 {
1124 jackinit();
1125 if (jackclient!=NULL)
1126 {
1127 __sint64 frame_time = /* currentlocation() */
1128 (__sint64)(libjack->jack_get_current_transport_frame(jackclient));
1129 hd24_transport_locate((__sint64)(frame_time+frames));
1130 return;
1131 }
1132 }
1133 }
1134}
1135
1136if (portaudio!=NULL)
1137{
1138 if (portaudio->libloaded)
1139 {
1140 __sint64 frame_time=currentlocation();
1141 hd24_transport_locate((__sint64)(frame_time+frames));
1142
1143//string* dur=currsong->display_cursor();
1144//setstatus(*dur);
1145//delete (dur);
1146
1147 return;
1148 }
1149}} {}
1150 }
1151 Function {hd24_transport_rew(long int frames)} {open return_type void
1152 } {
1153 code {if (libjack!=NULL)
1154{
1155 if (libjack->libloaded)
1156 {
1157 if (portaudio_initialized!=1)
1158 {
1159 jackinit();
1160 if (jackclient!=NULL)
1161 {
1162 __sint64 frame_time =
1163 (__sint64)(libjack->jack_get_current_transport_frame(jackclient));
1164 if (frames>frame_time) {
1165 hd24_transport_locate((__sint64)0);
1166 } else {
1167 hd24_transport_locate((__sint64)(frame_time-frames));
1168 }
1169 return;
1170 }
1171 }
1172 }
1173}
1174
1175if (portaudio!=NULL)
1176{
1177 if (portaudio->libloaded) {
1178
1179 __sint64 frame_time=currentlocation();
1180 if (frames>frame_time) {
1181 hd24_transport_locate((__sint64)0);
1182 } else {
1183 hd24_transport_locate((__sint64)(frame_time-frames));
1184 }
1185
1186 hd24_transport_locate((__sint64)(frame_time-frames));
1187
1188 return;
1189 }
1190}} {}
1191 }
1192 Function {isinitialized()} {return_type bool
1193 } {
1194 code {if (this->isportaudioinitialized())
1195{
1196 return true;
1197}
1198if (this->isjackinitialized())
1199{
1200 return true;
1201}
1202return false;} {}
1203 }
1204 Function {mustloop()} {return_type bool
1205 } {
1206 code {return this->as_mustloop;} {}
1207 }
1208 Function {mustloop(bool yesno)} {return_type void
1209 } {
1210 code {this->as_mustloop=yesno;} {}
1211 }
1212 Function {samplerate()} {return_type __uint32
1213 } {
1214 code {return this->samrate;
1215/*(double)(currsong->samplerate()/(currsong->physical_channels()/currsong->logical_channels())); */} {}
1216 }
1217 Function {samplerate(__uint32 newrate)} {return_type void
1218 } {
1219 code {this->samrate=newrate;} {}
1220 }
1221 Function {looppos()} {return_type __uint32
1222 } {
1223 code {return this->as_looppos;} {}
1224 }
1225 Function {looppos(__uint32 newpos)} {return_type void
1226 } {
1227 code {this->as_looppos=newpos;} {}
1228 }
1229 Function {locatepoint(int locpointnum,__uint32 locatepos)} {return_type void
1230 } {
1231 code {if (tape==NULL) return;
1232tape->setlocatepos(locpointnum,locatepos);} {}
1233 }
1234 Function {locatepoint(int locpointnum)} {return_type __uint32
1235 } {
1236 code {if (tape==NULL) return 0;
1237return tape->getlocatepos(locpointnum);} {}
1238 }
1239 Function {audiolib(int whichlib,void* libptr)} {open return_type void
1240 } {
1241 code {if (whichlib==AUDIOLIB_PORTAUDIO)
1242{
1243 this->portaudio=(PortAudioWrapper*)libptr;
1244\#if (RECORDERDEBUG==1)
1245cout << "set portaudio lib to " << libptr << endl;
1246\#endif
1247 return;
1248}
1249if (whichlib==AUDIOLIB_JACK)
1250{
1251 this->libjack=(JackWrapper*)libptr;
1252\#if (RECORDERDEBUG==1)
1253cout << "set jack lib to " << libptr << endl;
1254\#endif
1255 return;
1256}
1257if (whichlib==AUDIOLIB_SNDFILE)
1258{
1259 this->soundfile=(SoundFileWrapper*)libptr;
1260\#if (RECORDERDEBUG==1)
1261cout << "set soundfile lib to " << libptr << endl;
1262\#endif
1263}} {}
1264 }
1265 Function {audiolib(int whichlib)} {open return_type {void*}
1266 } {
1267 code {if (whichlib==AUDIOLIB_PORTAUDIO)
1268{
1269 return (void*)portaudio;
1270}
1271if (whichlib==AUDIOLIB_JACK)
1272{
1273 return (void*)libjack;
1274}
1275if (whichlib==AUDIOLIB_SNDFILE)
1276{
1277 return (void*)soundfile;
1278}
1279return NULL;} {}
1280 }
1281 Function {~AudioSystem()} {open
1282 } {
1283 code {if (inputParameters!=NULL)
1284{
1285 delete inputParameters;
1286 inputParameters=NULL;
1287}
1288if (outputParameters!=NULL)
1289{
1290 delete outputParameters;
1291 outputParameters=NULL;
1292}
1293\#if (RECORDERDEBUG==1)
1294cout << "AudioSystem::~AudioSystem()" << endl;
1295\#endif} {}
1296 }
1297 Function {audiostore(AudioStorage* store)} {open return_type void
1298 } {
1299 code {this->tape=store;
1300if (store!=NULL)
1301{
1302 this->samrate=store->samplerate();
1303}} {}
1304 }
1305 Function {audiostore()} {open return_type {AudioStorage*}
1306 } {
1307 code {return tape;} {}
1308 }
1309 Function {mixer(MixerControl* p_mixer)} {open return_type void
1310 } {
1311 code {this->mixercontrol=p_mixer;} {}
1312 }
1313 Function {mixer()} {open return_type {MixerControl*}
1314 } {
1315 code {return this->mixercontrol;} {}
1316 }
1317}
1318
1319class RecorderData {open
1320} {
1321 decl {int loopmode;} {public
1322 }
1323 decl {float trackpeak[24];} {public
1324 }
1325}
1326
1327class RecorderControl {open
1328} {
1329 decl {RecorderData* data;} {public
1330 }
1331 decl {RecorderUI* ui;} {public
1332 }
1333 decl {AudioSystem* audio;} {public
1334 }
1335 Function {RecorderControl()} {open
1336 } {
1337 code {this->data=new RecorderData();
1338init();} {}
1339 }
1340 Function {~RecorderControl()} {open
1341 } {
1342 code {if (this->data!=NULL)
1343{
1344 delete this->data;
1345}} {}
1346 }
1347 Function {init()} {open return_type void
1348 } {
1349 code {this->ui=NULL;
1350this->audio=new AudioSystem(this);
1351data->loopmode=0;} {}
1352 }
1353 Function {ready()} {open return_type int
1354 } {
1355 code {return 1;} {}
1356 }
1357 Function {parentui()} {open return_type {RecorderUI*}
1358 } {
1359 code {return this->ui;} {}
1360 }
1361 Function {parentui(RecorderUI* p_ui)} {open return_type void
1362 } {
1363 code {this->ui=p_ui;} {}
1364 }
1365 Function {loopmode()} {open return_type int
1366 } {
1367 code {return data->loopmode;} {}
1368 }
1369 Function {loopmode(int p_loopmode)} {return_type void
1370 } {
1371 code {data->loopmode=p_loopmode;
1372if (ui!=NULL)
1373{
1374 ui->button_loopmode->value(p_loopmode);
1375 ui->button_loopmode->redraw();
1376}} {}
1377 }
1378 Function {button_scrub_call(int amount,RecorderControl* mycontrol)} {open return_type {static void}
1379 } {
1380 code {if (mycontrol->audio==NULL) return;
1381// we could get the current transport pos here; ....
1382if (amount>0) {
1383mycontrol->audio->hd24_transport_ffwd((__uint32)(300*amount));
1384} else {
1385mycontrol->audio->hd24_transport_rew((__uint32)(-300*amount));
1386}
1387// ... then the new transport pos here; read the snippet
1388// of audio that is spanned by the difference, stretch
1389// it to the audio buffer size, then play it.
1390// Alternatively, a visual-only representation could be fine.} {}
1391 }
1392 Function {button_rew_call()} {open return_type void
1393 } {
1394 code {if (this->audio==NULL) return;
1395this->audio->hd24_transport_rew(5*this->audio->samplerate());} {}
1396 }
1397 Function {button_ffwd_call()} {open return_type void
1398 } {
1399 code {if (this->audio==NULL) return;
1400this->audio->hd24_transport_ffwd(5*this->audio->samplerate());} {}
1401 }
1402 Function {button_stop_call()} {open return_type void
1403 } {
1404 code {if (this->audio==NULL) return;
1405//this->currenthd24->settransportstatus(hd24fs::TRANSPORTSTATUS_STOP);
1406//TODO: The above is for monitoring purposes
1407this->audio->hd24_transport_stop();
1408if (ui==NULL) return;
1409
1410ui->button_light((void*)(ui->button_stop),1);
1411//button_stop->up_image(button_stop_uplit->image());
1412ui->button_up((void*)(ui->button_play));
1413ui->button_up((void*)(ui->button_rec));} {}
1414 }
1415 Function {button_play_call()} {open return_type void
1416 } {
1417 code {if (this->audio==NULL) return;
1418//if (button_rec->value()==1) {
1419// this->currenthd24->settransportstatus(hd24fs::TRANSPORTSTATUS_REC);
1420// TODO: The above is for monitoring purposes
1421//} else {
1422// this->currenthd24->settransportstatus(hd24fs::TRANSPORTSTATUS_PLAY);
1423// TODO: The above is for monitoring purposes
1424//}
1425this->audio->hd24_transport_start();
1426
1427ui->button_light(ui->button_stop,0);
1428
1429if (ui->button_play->value()==1)
1430{
1431 ui->button_up(ui->button_rec);
1432}
1433ui->button_down(ui->button_play);} {}
1434 }
1435 Function {button_rec_call()} {open return_type void
1436 } {
1437 code {/* ui->button_rec->redraw();
1438if (currsong==NULL) return;
1439if (currenthd24==NULL) return;
1440
1441if (this->currenthd24->gettransportstatus()==hd24fs::TRANSPORTSTATUS_STOP) {
1442 return;
1443}
1444
1445if (ui->button_rec->value()==1) {
1446 this->currenthd24->settransportstatus(hd24fs::TRANSPORTSTATUS_REC);
1447} else {
1448 this->currenthd24->settransportstatus(hd24fs::TRANSPORTSTATUS_PLAY);
1449}
1450
1451this->audio->hd24_transport_stop();
1452//button_play->value(0); */} {}
1453 }
1454 Function {solo(int channel,int val)} {} {
1455 code {// set solo status of channel to value
1456//mixer->mixerchannel[channel]->control->solo(val);} {}
1457 }
1458 Function {mute(int channel,int val)} {} {
1459 code {// set mute status of channel to value
1460//mixer->mixerchannel[channel]->control->mute(val);} {}
1461 }
1462 Function {resetpeaks()} {open return_type void
1463 } {
1464 code {for (int i=0;i<24;i++)
1465{
1466 data->trackpeak[i]=0;
1467}} {}
1468 }
1469 Function {highlight_setbuttons(int value)} {open return_type void
1470 } {
1471 code {ui->highlight_setbuttons(value);} {}
1472 }
1473 Function {hd24_transport_goloc(__uint32 frames)} {open return_type void
1474 } {
1475 code {if (audio==NULL)
1476{
1477 return;
1478}
1479audio->hd24_transport_goloc(frames);} {}
1480 }
1481 Function {button_rehearse_call()} {return_type void
1482 } {
1483 code {return;} {}
1484 }
1485 Function {handlelocatebutton(__uint32 locpoint)} {return_type void
1486 } {
1487 code {// either set or jumpto locate point
1488
1489if (ui->button_setlocate->value()==1)
1490{
1491 // set locate point
1492 ui->button_setlocate->value(0);
1493 highlight_setbuttons(ui->button_setlocate->value());
1494 // set loop start to current song cursor
1495 if (audio==NULL) return;
1496 audio->locatepoint(locpoint,audio->currentlocation());
1497// ui->populate_locatepoints(currsong,ui->locatepoints);
1498} else {
1499 // jump to locate point
1500 if (audio==NULL) return;
1501 audio->hd24_transport_locate((__sint64)(audio->locatepoint(locpoint)));
1502}} {}
1503 }
1504 Function {disable()} {} {
1505 code {/* Disable the recorder */
1506//fl_message("TODO: recordercontrol::disable()");
1507if ((this->ui)==NULL) return;
1508this->ui->deactivate();} {}
1509 }
1510 Function {enable()} {} {
1511 code {/* Disable the recorder */
1512//fl_message("TODO: recordercontrol::enable()");
1513if ((this->ui)==NULL) return;
1514this->ui->activate();} {}
1515 }
1516 decl {int dispwritecountdown;} {public
1517 }
1518 Function {dispwrite(unsigned int line,const char* message)} {return_type void
1519 } {
1520 code {ui->dispwrite(line,message);} {}
1521 }
1522 Function {dispwrite(unsigned int line,const char* message,__uint32 timeout_msec)} {return_type void
1523 } {
1524 code {ui->dispwrite(line,message,timeout_msec);} {}
1525 }
1526 Function {audiolib(int whichlib,void* libptr)} {open return_type void
1527 } {
1528 code {if (audio==NULL) return;
1529audio->audiolib(whichlib,libptr);} {}
1530 }
1531 Function {song(hd24song* store)} {open return_type void
1532 } {
1533 code {audio->audiostore((AudioStorage*)store);
1534if (store!=NULL)
1535{
1536 this->enable();
1537} else {
1538 this->disable();
1539}
1540if (store==NULL)
1541{
1542 string* disp=new string(" No Song "
1543 " Selected ");
1544 dispwrite(0,disp->c_str());
1545 delete disp;
1546}
1547else
1548{
1549
1550 string disp="S";
1551 string* idstr=Convert::int2str(store->songid(),2,"0");
1552 disp+=*idstr;
1553 delete idstr;
1554 disp+=":\\"";
1555 string* dummy=store->songname();
1556 //transfersource->value(dummy->c_str());
1557 string* dummy2=Convert::readstring((unsigned char*)dummy->c_str(),0,10);
1558 string* dummy3=Convert::readstring((unsigned char*)dummy->c_str(),0,11);
1559
1560 disp+=*dummy2;
1561 delete dummy;
1562 delete dummy2;
1563 if (dummy3->length()>10)
1564 {
1565 disp+="\\4"; // arrow right
1566 } else {
1567 disp+="\\"";
1568 }
1569 delete dummy3;
1570 string* disp2=Convert::padright(disp,16," ");
1571
1572 string* dur=store->display_duration();
1573
1574 *disp2+=dur->substr(0,8);
1575 *disp2+=":";
1576 *disp2+=dur->substr(9,2);
1577 *disp2+=" ";
1578 delete dur;
1579
1580 if (store->iswriteprotected())
1581 {
1582 *disp2+="\\1";
1583 } else {
1584 *disp2+="\\2";
1585 }
1586 string* strtracksb=Convert::int2str(store->logical_channels(),2,"0");
1587 *disp2+=*strtracksb;
1588 delete strtracksb;
1589 *disp2+="t";
1590
1591 dispwrite(0,disp2->c_str());
1592 delete disp2;
1593
1594}} {selected
1595 }
1596 }
1597 Function {song()} {open return_type {hd24song*}
1598 } {
1599 code {return (hd24song*)audio->audiostore();} {}
1600 }
1601 Function {toggletrackarmed(__uint32 base1tracknum)} {open return_type void
1602 } {
1603 code {AudioStorage* astore=(hd24song*)(this->audio->audiostore());
1604astore->trackarmed(base1tracknum,!astore->trackarmed(base1tracknum));} {}
1605 }
1606}
1607
1608class RecorderUI {: {public Fl_Group}
1609} {
1610 decl {RecorderControl* control;} {public
1611 }
1612 Function {RecorderUI(int a,int b,int c,int d):Fl_Group(a,b,c,d,NULL)} {open
1613 } {
1614 code {this->control=new RecorderControl();
1615control->parentui(this);
1616this->window=(Fl_Window*)(this->make_window());
1617this->init_gui();} {}
1618 }
1619 Function {~RecorderUI()} {open
1620 } {
1621 code {delete control;} {}
1622 }
1623 Function {init_gui()} {open
1624 } {
1625 code {// position vu meters on recorder tab
1626int startx=trackchan[0]->x();
1627int starty=trackchan[0]->y();
1628for (unsigned int i=1; i<=MAXCHANNELS; i++) {
1629 int coloff=((i-((i-1)%8))-1)/8;
1630 trackchan[i-1]->setui(this);
1631 trackchan[i-1]->position(7+(18*coloff)+(startx)+((i-1)*23),starty+10);
1632 trackchan[i-1]->setchnum(i);
1633
1634 solobutton[i-1]->position(8+(15*coloff)+(startx)+((i-1)*23),solobutton[i-1]->y());
1635 solobutton[i-1]->size(solobutton[0]->w(),solobutton[0]->h());
1636 solobutton[i-1]->up_image(solobutton[0]->up_image());
1637 solobutton[i-1]->down_image(solobutton[0]->down_image());
1638 mutebutton[i-1]->up_image(mutebutton[0]->up_image());
1639 mutebutton[i-1]->down_image(mutebutton[0]->down_image());
1640 mutebutton[i-1]->position(solobutton[i-1]->x(),mutebutton[i-1]->y());
1641 mutebutton[i-1]->size(mutebutton[0]->w(),mutebutton[0]->h());
1642
1643 armbutton[i-1]->position(solobutton[i-1]->x(),armbutton[i-1]->y());
1644 if (i!=1) {
1645 armbutton[i-1]->size(armbutton[0]->w(),armbutton[0]->h());
1646 armbutton[i-1]->up_image(armbutton[0]->up_image());
1647 armbutton[i-1]->down_image(armbutton[0]->down_image());
1648 }
1649
1650}
1651
1652
1653trackinfo[0]->position(8*23+15,starty+10);
1654trackinfo[1]->position(16*23+33,starty+10);} {}
1655 }
1656 Function {set_ui(HD24UserInterface* p_ui)} {open return_type void
1657 } {
1658 code {this->ui=p_ui;} {}
1659 }
1660 decl {bool mustdisplaytimer;} {public
1661 }
1662 decl {int loopmode;} {public
1663 }
1664 decl {RecorderChannelUI* recorderchannel[24];} {public
1665 }
1666 decl {/* ==== RECORDER UI STUFF ====================*/} {}
1667 decl {HD24UserInterface* ui;} {}
1668 decl {//hd24fs* currenthd24;} {public
1669 }
1670 decl {//hd24song* currsong;} {public
1671 }
1672 decl {Fl_Window* window} {}
1673 decl {int currpeakmode;} {public
1674 }
1675 decl {Fl_Box* dispcell[16][2];} {public
1676 }
1677 decl {Fl_Box* i7seg[10];} {public
1678 }
1679 decl {Fl_Box* dispfont[256];} {public
1680 }
1681 decl {int slidermoved;} {public
1682 }
1683 decl {Fl_Image_Button* armbutton[24];} {public
1684 }
1685 decl {Fl_Image_Toggle_Button* mutebutton[24];} {public
1686 }
1687 decl {Fl_Image_Toggle_Button* solobutton[24];} {public
1688 }
1689 decl {int blinkcounter; /* For blinking record enable leds of level meters etc */} {public
1690 }
1691 decl {HD24TrackChannel* trackchan[24];} {public
1692 }
1693 decl {TrackInfo* trackinfo[24];} {public
1694 }
1695 decl {char olddisp[32];} {}
1696 Function {dispwrite_raw(unsigned int line,const char* message,bool savedisp)} {private return_type void
1697 } {
1698 code {unsigned int max=strlen(message);
1699// allowed lines on display: 0 and 1
1700if (line>1) { return; }
1701
1702if (max>(16*(2-line))) {
1703 // maximum 16 chars if we start on line 1 (second line)
1704 // 32 chars if we start on line 0 (first line).
1705 max=(16*(2-line));
1706}
1707
1708for (unsigned int i=0;i<max;i++) {
1709 if (i==16) { line++; }
1710 unsigned int currchar=(unsigned int)((unsigned char)(message[i]));
1711 if (savedisp)
1712 {
1713 olddisp[(i%16)+(16*line)]=currchar;
1714 }
1715 this->dispcell[i%16][line]->image(dispfont[currchar]->image());
1716 this->dispcell[i%16][line]->redraw();
1717
1718}
1719fl_check();} {}
1720 }
1721 decl {int dispwritecountdown;} {public
1722 }
1723 Function {dispwrite(unsigned int line,const char* message)} {return_type void
1724 } {
1725 code {dispwrite_raw(line,message,true);
1726dispwritecountdown=0;} {}
1727 }
1728 Function {disprestore()} {return_type void
1729 } {
1730 code {dispwrite_raw(0,&olddisp[0],false);
1731dispwritecountdown=0;} {}
1732 }
1733 Function {dispwrite(unsigned int line,const char* message,__uint32 timeout_msec)} {return_type void
1734 } {
1735 code {dispwrite_raw(line,message,false);
1736 dispwritecountdown=(int)(1000*TIMEOUT);} {}
1737 }
1738 Function {readmixer()} {open return_type void
1739 } {
1740 code {// set solo status of channel to value
1741/*
1742for (unsigned int i=0;i<MAXCHANNELS;i++) {
1743 solobutton[i]->value(mixer->mixerchannel[i]->control->solo());
1744 solobutton[i]->redraw();
1745 mutebutton[i]->value(mixer->mixerchannel[i]->control->mute());
1746 mutebutton[i]->redraw();
1747}
1748*/} {}
1749 }
1750 Function {make_window() /*<-----------------------------------*/} {open
1751 } {
1752 Fl_Window recordergroup {open
1753 xywh {378 259 615 440} type Double
1754 code0 {o->position(this->x(),this->y());}
1755 class Fl_Group visible
1756 } {
1757 Fl_Group resources {open
1758 xywh {25 62 560 423} hide deactivate
1759 } {
1760 Fl_Button button_play_up {
1761 tooltip Play image {images/button_play.gif} xywh {25 75 50 30} labelsize 11 align 16 deactivate
1762 }
1763 Fl_Button button_play_dn {
1764 tooltip Play image {images/button_play_dn.gif} xywh {75 75 50 30} labelsize 11 align 16 deactivate
1765 }
1766 Fl_Button button_stop_dn {
1767 tooltip Play image {images/button_stop_dn.gif} xywh {295 445 50 30} labelsize 11 align 16 deactivate
1768 }
1769 Fl_Button button_stop_up {
1770 tooltip Play image {images/button_stop.gif} xywh {345 445 50 30} labelsize 11 align 16 deactivate
1771 }
1772 Fl_Button button_stop_uplit {
1773 tooltip Play image {images/button_stop_uplit.gif} xywh {355 455 50 30} labelsize 11 align 16 deactivate
1774 }
1775 Fl_Button button_small_up {
1776 tooltip arm image {images/button_small.gif} xywh {565 195 20 15} deactivate
1777 }
1778 Fl_Button button_small_dn {
1779 tooltip arm image {images/button_small_dn.gif} xywh {60 215 20 15} deactivate
1780 }
1781 Fl_Button button_rew_up {
1782 tooltip Play image {images/button_rew.gif} xywh {35 85 50 30} labelsize 11 align 16 deactivate
1783 }
1784 Fl_Button button_rew_dn {
1785 tooltip Play image {images/button_rew_dn.gif} xywh {85 85 50 30} labelsize 11 align 16 deactivate
1786 }
1787 Fl_Button button_ffwd_up {
1788 tooltip Play image {images/button_ffwd.gif} xywh {45 95 50 30} labelsize 11 align 16 deactivate
1789 }
1790 Fl_Button button_ffwd_dn {
1791 tooltip Play image {images/button_ffwd_dn.gif} xywh {95 95 50 30} labelsize 11 align 16 deactivate
1792 }
1793 Fl_Button button_rec_up {
1794 tooltip Play image {images/button_rec.gif} xywh {55 105 50 30} labelsize 11 align 16 deactivate
1795 }
1796 Fl_Button button_rec_dn {
1797 tooltip Play image {images/button_rec_dn.gif} xywh {105 105 50 30} labelsize 11 align 16 deactivate
1798 }
1799 Fl_Button button_mute_up {
1800 tooltip Play image {images/button_mute.gif} xywh {65 115 50 30} labelsize 11 align 16 deactivate
1801 }
1802 Fl_Button button_mute_dn {
1803 tooltip Play image {images/button_mute_dn.gif} xywh {115 115 50 30} labelsize 11 align 16 deactivate
1804 }
1805 Fl_Button button_solo_up {
1806 tooltip Play image {images/button_solo.gif} xywh {75 125 50 30} labelsize 11 align 16 deactivate
1807 }
1808 Fl_Button button_solo_dn {
1809 tooltip Play image {images/button_solo_dn.gif} xywh {125 125 50 30} labelsize 11 align 16 deactivate
1810 }
1811 Fl_Button button_lrc_led_up {
1812 tooltip Play image {images/button_lrc_led.gif} xywh {85 135 50 30} labelsize 11 align 16 deactivate
1813 }
1814 Fl_Button button_lrc_led_dn {
1815 tooltip Play image {images/button_lrc_led_dn.gif} xywh {135 135 50 30} labelsize 11 align 16 deactivate
1816 }
1817 Fl_Button button_lrc_led_on_up {
1818 tooltip Play image {images/button_lrc_led_on.gif} xywh {85 135 50 30} labelsize 11 align 16 deactivate
1819 }
1820 Fl_Button button_lrc_led_on_dn {
1821 tooltip Play image {images/button_lrc_led_on_dn.gif} xywh {135 135 50 30} labelsize 11 align 16 deactivate
1822 }
1823 Fl_Button button_lrc_up {
1824 tooltip Play image {images/button_lrc.gif} xywh {85 135 50 30} labelsize 11 align 16 deactivate
1825 }
1826 Fl_Button button_lrc_dn {
1827 tooltip Play image {images/button_lrc_dn.gif} xywh {135 135 50 30} labelsize 11 align 16 deactivate
1828 }
1829 Fl_Box i7seg0 {
1830 image {images/7seg_0.gif} xywh {325 276 20 34} hide
1831 code0 {i7seg[0]=o;}
1832 }
1833 Fl_Box i7seg1 {
1834 image {images/7seg_1.gif} xywh {325 276 20 34} hide
1835 code0 {i7seg[1]=o;}
1836 }
1837 Fl_Box i7seg2 {
1838 image {images/7seg_2.gif} xywh {325 276 20 34} hide
1839 code0 {i7seg[2]=o;}
1840 }
1841 Fl_Box i7seg3 {
1842 image {images/7seg_3.gif} xywh {325 276 20 34} hide
1843 code0 {i7seg[3]=o;}
1844 }
1845 Fl_Box i7seg4 {
1846 image {images/7seg_4.gif} xywh {325 276 20 34} hide
1847 code0 {i7seg[4]=o;}
1848 }
1849 Fl_Box i7seg5 {
1850 image {images/7seg_5.gif} xywh {325 276 20 34} hide
1851 code0 {i7seg[5]=o;}
1852 }
1853 Fl_Box i7seg6 {
1854 image {images/7seg_6.gif} xywh {325 276 20 34} hide
1855 code0 {i7seg[6]=o;}
1856 }
1857 Fl_Box i7seg7 {
1858 image {images/7seg_7.gif} xywh {325 276 20 34} hide
1859 code0 {i7seg[7]=o;}
1860 }
1861 Fl_Box i7seg8 {
1862 image {images/7seg_8.gif} xywh {325 276 20 34} hide
1863 code0 {i7seg[8]=o;}
1864 }
1865 Fl_Box i7seg9 {
1866 image {images/7seg_9.gif} xywh {325 276 20 34} hide
1867 code0 {i7seg[9]=o;}
1868 }
1869 Fl_Group dispfontgroup {
1870 label font open
1871 xywh {565 28 70 52} hide deactivate
1872 } {
1873 Fl_Box {} {
1874 label label
1875 image {images/HD24_matrix_32.gif} xywh {580 43 35 17} hide
1876 code0 {this->dispfont[32]=o;}
1877 }
1878 Fl_Box {} {
1879 label label
1880 image {images/HD24_matrix_33.gif} xywh {580 43 35 17} hide
1881 code0 {this->dispfont[33]=o;}
1882 }
1883 Fl_Box {} {
1884 label label
1885 image {images/HD24_matrix_34.gif} xywh {580 43 35 17} hide
1886 code0 {this->dispfont[34]=o;}
1887 }
1888 Fl_Box {} {
1889 label label
1890 image {images/HD24_matrix_35.gif} xywh {580 43 35 17} hide
1891 code0 {this->dispfont[35]=o;}
1892 }
1893 Fl_Box {} {
1894 label label
1895 image {images/HD24_matrix_36.gif} xywh {580 43 35 17} hide
1896 code0 {this->dispfont[36]=o;}
1897 }
1898 Fl_Box {} {
1899 label label
1900 image {images/HD24_matrix_37.gif} xywh {580 43 35 17} hide
1901 code0 {this->dispfont[37]=o;}
1902 }
1903 Fl_Box {} {
1904 label label
1905 image {images/HD24_matrix_38.gif} xywh {580 43 35 17} hide
1906 code0 {this->dispfont[38]=o;}
1907 }
1908 Fl_Box {} {
1909 label label
1910 image {images/HD24_matrix_39.gif} xywh {580 43 35 17} hide
1911 code0 {this->dispfont[39]=o;}
1912 }
1913 Fl_Box {} {
1914 label label
1915 image {images/HD24_matrix_40.gif} xywh {580 43 35 17} hide
1916 code0 {this->dispfont[40]=o;}
1917 }
1918 Fl_Box {} {
1919 label label
1920 image {images/HD24_matrix_41.gif} xywh {580 43 35 17} hide
1921 code0 {this->dispfont[41]=o;}
1922 }
1923 Fl_Box {} {
1924 label label
1925 image {images/HD24_matrix_42.gif} xywh {580 43 35 17} hide
1926 code0 {this->dispfont[42]=o;}
1927 }
1928 Fl_Box {} {
1929 label label
1930 image {images/HD24_matrix_43.gif} xywh {580 43 35 17} hide
1931 code0 {this->dispfont[43]=o;}
1932 }
1933 Fl_Box {} {
1934 label label
1935 image {images/HD24_matrix_44.gif} xywh {580 43 35 17} hide
1936 code0 {this->dispfont[44]=o;}
1937 }
1938 Fl_Box {} {
1939 label label
1940 image {images/HD24_matrix_45.gif} xywh {580 43 35 17} hide
1941 code0 {this->dispfont[45]=o;}
1942 }
1943 Fl_Box {} {
1944 label label
1945 image {images/HD24_matrix_46.gif} xywh {580 43 35 17} hide
1946 code0 {this->dispfont[46]=o;}
1947 }
1948 Fl_Box {} {
1949 label label
1950 image {images/HD24_matrix_47.gif} xywh {580 43 35 17} hide
1951 code0 {this->dispfont[47]=o;}
1952 }
1953 Fl_Box {} {
1954 label label
1955 image {images/HD24_matrix_48.gif} xywh {580 43 35 17} hide
1956 code0 {this->dispfont[48]=o;}
1957 }
1958 Fl_Box {} {
1959 label label
1960 image {images/HD24_matrix_49.gif} xywh {580 43 35 17} hide
1961 code0 {this->dispfont[49]=o;}
1962 }
1963 Fl_Box {} {
1964 label label
1965 image {images/HD24_matrix_50.gif} xywh {580 43 35 17} hide
1966 code0 {this->dispfont[50]=o;}
1967 }
1968 Fl_Box {} {
1969 label label
1970 image {images/HD24_matrix_51.gif} xywh {580 43 35 17} hide
1971 code0 {this->dispfont[51]=o;}
1972 }
1973 Fl_Box {} {
1974 label label
1975 image {images/HD24_matrix_52.gif} xywh {580 43 35 17} hide
1976 code0 {this->dispfont[52]=o;}
1977 }
1978 Fl_Box {} {
1979 label label
1980 image {images/HD24_matrix_53.gif} xywh {580 43 35 17} hide
1981 code0 {this->dispfont[53]=o;}
1982 }
1983 Fl_Box {} {
1984 label label
1985 image {images/HD24_matrix_54.gif} xywh {580 43 35 17} hide
1986 code0 {this->dispfont[54]=o;}
1987 }
1988 Fl_Box {} {
1989 label label
1990 image {images/HD24_matrix_55.gif} xywh {580 43 35 17} hide
1991 code0 {this->dispfont[55]=o;}
1992 }
1993 Fl_Box {} {
1994 label label
1995 image {images/HD24_matrix_56.gif} xywh {580 43 35 17} hide
1996 code0 {this->dispfont[56]=o;}
1997 }
1998 Fl_Box {} {
1999 label label
2000 image {images/HD24_matrix_57.gif} xywh {580 43 35 17} hide
2001 code0 {this->dispfont[57]=o;}
2002 }
2003 Fl_Box {} {
2004 label label
2005 image {images/HD24_matrix_58.gif} xywh {580 43 35 17} hide
2006 code0 {this->dispfont[58]=o;}
2007 }
2008 Fl_Box {} {
2009 label label
2010 image {images/HD24_matrix_59.gif} xywh {580 43 35 17} hide
2011 code0 {this->dispfont[59]=o;}
2012 }
2013 Fl_Box {} {
2014 label label
2015 image {images/HD24_matrix_60.gif} xywh {580 43 35 17} hide
2016 code0 {this->dispfont[60]=o;}
2017 }
2018 Fl_Box {} {
2019 label label
2020 image {images/HD24_matrix_61.gif} xywh {580 43 35 17} hide
2021 code0 {this->dispfont[61]=o;}
2022 }
2023 Fl_Box {} {
2024 label label
2025 image {images/HD24_matrix_62.gif} xywh {580 43 35 17} hide
2026 code0 {this->dispfont[62]=o;}
2027 }
2028 Fl_Box {} {
2029 label label
2030 image {images/HD24_matrix_63.gif} xywh {580 43 35 17} hide
2031 code0 {this->dispfont[63]=o;}
2032 }
2033 Fl_Box {} {
2034 label label
2035 image {images/HD24_matrix_64.gif} xywh {580 43 35 17} hide
2036 code0 {this->dispfont[64]=o;}
2037 }
2038 Fl_Box {} {
2039 label A
2040 image {images/HD24_matrix_65.gif} xywh {580 43 35 17} hide
2041 code0 {this->dispfont[65]=o;}
2042 }
2043 Fl_Box {} {
2044 label B
2045 image {images/HD24_matrix_66.gif} xywh {580 43 35 17} hide
2046 code0 {this->dispfont[66]=o;}
2047 }
2048 Fl_Box {} {
2049 label C
2050 image {images/HD24_matrix_67.gif} xywh {580 43 35 17} hide
2051 code0 {this->dispfont[67]=o;}
2052 }
2053 Fl_Box {} {
2054 label D
2055 image {images/HD24_matrix_68.gif} xywh {580 43 35 17} hide
2056 code0 {this->dispfont[68]=o;}
2057 }
2058 Fl_Box {} {
2059 label E
2060 image {images/HD24_matrix_69.gif} xywh {580 43 35 17} hide
2061 code0 {this->dispfont[69]=o;}
2062 }
2063 Fl_Box {} {
2064 label F
2065 image {images/HD24_matrix_70.gif} xywh {580 43 35 17} hide
2066 code0 {this->dispfont[70]=o;}
2067 }
2068 Fl_Box {} {
2069 label G
2070 image {images/HD24_matrix_71.gif} xywh {580 43 35 17} hide
2071 code0 {this->dispfont[71]=o;}
2072 }
2073 Fl_Box {} {
2074 label H
2075 image {images/HD24_matrix_72.gif} xywh {580 43 35 17} hide
2076 code0 {this->dispfont[72]=o;}
2077 }
2078 Fl_Box {} {
2079 label I
2080 image {images/HD24_matrix_73.gif} xywh {580 43 35 17} hide
2081 code0 {this->dispfont[73]=o;}
2082 }
2083 Fl_Box {} {
2084 label J
2085 image {images/HD24_matrix_74.gif} xywh {580 43 35 17} hide
2086 code0 {this->dispfont[74]=o;}
2087 }
2088 Fl_Box {} {
2089 label K
2090 image {images/HD24_matrix_75.gif} xywh {580 43 35 17} hide
2091 code0 {this->dispfont[75]=o;}
2092 }
2093 Fl_Box {} {
2094 label L
2095 image {images/HD24_matrix_76.gif} xywh {580 43 35 17} hide
2096 code0 {this->dispfont[76]=o;}
2097 }
2098 Fl_Box {} {
2099 label M
2100 image {images/HD24_matrix_77.gif} xywh {580 43 35 17} hide
2101 code0 {this->dispfont[77]=o;}
2102 }
2103 Fl_Box {} {
2104 label N
2105 image {images/HD24_matrix_78.gif} xywh {580 43 35 17} hide
2106 code0 {this->dispfont[78]=o;}
2107 }
2108 Fl_Box {} {
2109 label O
2110 image {images/HD24_matrix_79.gif} xywh {580 43 35 17} hide
2111 code0 {this->dispfont[79]=o;}
2112 }
2113 Fl_Box {} {
2114 label P
2115 image {images/HD24_matrix_80.gif} xywh {580 43 35 17} hide
2116 code0 {this->dispfont[80]=o;}
2117 }
2118 Fl_Box {} {
2119 label Q
2120 image {images/HD24_matrix_81.gif} xywh {580 43 35 17} hide
2121 code0 {this->dispfont[81]=o;}
2122 }
2123 Fl_Box {} {
2124 label R
2125 image {images/HD24_matrix_82.gif} xywh {580 43 35 17} hide
2126 code0 {this->dispfont[82]=o;}
2127 }
2128 Fl_Box {} {
2129 label S
2130 image {images/HD24_matrix_83.gif} xywh {580 43 35 17} hide
2131 code0 {this->dispfont[83]=o;}
2132 }
2133 Fl_Box {} {
2134 label T
2135 image {images/HD24_matrix_84.gif} xywh {580 43 35 17} hide
2136 code0 {this->dispfont[84]=o;}
2137 }
2138 Fl_Box {} {
2139 label U
2140 image {images/HD24_matrix_85.gif} xywh {580 43 35 17} hide
2141 code0 {this->dispfont[85]=o;}
2142 }
2143 Fl_Box {} {
2144 label V
2145 image {images/HD24_matrix_86.gif} xywh {580 43 35 17} hide
2146 code0 {this->dispfont[86]=o;}
2147 }
2148 Fl_Box {} {
2149 label W
2150 image {images/HD24_matrix_87.gif} xywh {580 43 35 17} hide
2151 code0 {this->dispfont[87]=o;}
2152 }
2153 Fl_Box {} {
2154 label X
2155 image {images/HD24_matrix_88.gif} xywh {580 43 35 17} hide
2156 code0 {this->dispfont[88]=o;}
2157 }
2158 Fl_Box {} {
2159 label Y
2160 image {images/HD24_matrix_89.gif} xywh {580 43 35 17} hide
2161 code0 {this->dispfont[89]=o;}
2162 }
2163 Fl_Box {} {
2164 label Z
2165 image {images/HD24_matrix_90.gif} xywh {580 43 35 17} hide
2166 code0 {this->dispfont[90]=o;}
2167 }
2168 Fl_Box {} {
2169 label label
2170 image {images/HD24_matrix_91.gif} xywh {580 43 35 17} hide
2171 code0 {this->dispfont[91]=o;}
2172 }
2173 Fl_Box {} {
2174 label label
2175 image {images/HD24_matrix_92.gif} xywh {580 43 35 17} hide
2176 code0 {this->dispfont[92]=o;}
2177 }
2178 Fl_Box {} {
2179 label label
2180 image {images/HD24_matrix_93.gif} xywh {580 43 35 17} hide
2181 code0 {this->dispfont[93]=o;}
2182 }
2183 Fl_Box {} {
2184 label label
2185 image {images/HD24_matrix_94.gif} xywh {580 43 35 17} hide
2186 code0 {this->dispfont[94]=o;}
2187 }
2188 Fl_Box {} {
2189 label label
2190 image {images/HD24_matrix_95.gif} xywh {580 43 35 17} hide
2191 code0 {this->dispfont[95]=o;}
2192 }
2193 Fl_Box {} {
2194 label label
2195 image {images/HD24_matrix_96.gif} xywh {580 43 35 17} hide
2196 code0 {this->dispfont[96]=o;}
2197 }
2198 Fl_Box {} {
2199 label label
2200 image {images/HD24_matrix_97.gif} xywh {580 43 35 17} hide
2201 code0 {this->dispfont[97]=o;}
2202 }
2203 Fl_Box {} {
2204 label label
2205 image {images/HD24_matrix_98.gif} xywh {580 43 35 17} hide
2206 code0 {this->dispfont[98]=o;}
2207 }
2208 Fl_Box {} {
2209 label label
2210 image {images/HD24_matrix_99.gif} xywh {580 43 35 17} hide
2211 code0 {this->dispfont[99]=o;}
2212 }
2213 Fl_Box {} {
2214 label label
2215 image {images/HD24_matrix_100.gif} xywh {580 43 35 17} hide
2216 code0 {this->dispfont[100]=o;}
2217 }
2218 Fl_Box {} {
2219 label label
2220 image {images/HD24_matrix_101.gif} xywh {580 43 35 17} hide
2221 code0 {this->dispfont[101]=o;}
2222 }
2223 Fl_Box {} {
2224 label label
2225 image {images/HD24_matrix_102.gif} xywh {580 43 35 17} hide
2226 code0 {this->dispfont[102]=o;}
2227 }
2228 Fl_Box {} {
2229 label label
2230 image {images/HD24_matrix_103.gif} xywh {580 43 35 17} hide
2231 code0 {this->dispfont[103]=o;}
2232 }
2233 Fl_Box {} {
2234 label label
2235 image {images/HD24_matrix_104.gif} xywh {580 43 35 17} hide
2236 code0 {this->dispfont[104]=o;}
2237 }
2238 Fl_Box {} {
2239 label label
2240 image {images/HD24_matrix_105.gif} xywh {580 43 35 17} hide
2241 code0 {this->dispfont[105]=o;}
2242 }
2243 Fl_Box {} {
2244 label label
2245 image {images/HD24_matrix_106.gif} xywh {580 43 35 17} hide
2246 code0 {this->dispfont[106]=o;}
2247 }
2248 Fl_Box {} {
2249 label label
2250 image {images/HD24_matrix_107.gif} xywh {580 43 35 17} hide
2251 code0 {this->dispfont[107]=o;}
2252 }
2253 Fl_Box {} {
2254 label label
2255 image {images/HD24_matrix_108.gif} xywh {580 43 35 17} hide
2256 code0 {this->dispfont[108]=o;}
2257 }
2258 Fl_Box {} {
2259 label label
2260 image {images/HD24_matrix_109.gif} xywh {580 43 35 17} hide
2261 code0 {this->dispfont[109]=o;}
2262 }
2263 Fl_Box {} {
2264 label label
2265 image {images/HD24_matrix_110.gif} xywh {580 43 35 17} hide
2266 code0 {this->dispfont[110]=o;}
2267 }
2268 Fl_Box {} {
2269 label label
2270 image {images/HD24_matrix_111.gif} xywh {580 43 35 17} hide
2271 code0 {this->dispfont[111]=o;}
2272 }
2273 Fl_Box {} {
2274 label label
2275 image {images/HD24_matrix_112.gif} xywh {580 43 35 17} hide
2276 code0 {this->dispfont[112]=o;}
2277 }
2278 Fl_Box {} {
2279 label label
2280 image {images/HD24_matrix_113.gif} xywh {580 43 35 17} hide
2281 code0 {this->dispfont[113]=o;}
2282 }
2283 Fl_Box {} {
2284 label label
2285 image {images/HD24_matrix_114.gif} xywh {580 43 35 17} hide
2286 code0 {this->dispfont[114]=o;}
2287 }
2288 Fl_Box {} {
2289 label label
2290 image {images/HD24_matrix_115.gif} xywh {580 43 35 17} hide
2291 code0 {this->dispfont[115]=o;}
2292 }
2293 Fl_Box {} {
2294 label label
2295 image {images/HD24_matrix_116.gif} xywh {580 43 35 17} hide
2296 code0 {this->dispfont[116]=o;}
2297 }
2298 Fl_Box {} {
2299 label label
2300 image {images/HD24_matrix_117.gif} xywh {580 43 35 17} hide
2301 code0 {this->dispfont[117]=o;}
2302 }
2303 Fl_Box {} {
2304 label label
2305 image {images/HD24_matrix_118.gif} xywh {580 43 35 17} hide
2306 code0 {this->dispfont[118]=o;}
2307 }
2308 Fl_Box {} {
2309 label label
2310 image {images/HD24_matrix_119.gif} xywh {580 43 35 17} hide
2311 code0 {this->dispfont[119]=o;}
2312 }
2313 Fl_Box {} {
2314 label label
2315 image {images/HD24_matrix_120.gif} xywh {580 43 35 17} hide
2316 code0 {this->dispfont[120]=o;}
2317 }
2318 Fl_Box {} {
2319 label label
2320 image {images/HD24_matrix_121.gif} xywh {580 43 35 17} hide
2321 code0 {this->dispfont[121]=o;}
2322 }
2323 Fl_Box {} {
2324 label label
2325 image {images/HD24_matrix_122.gif} xywh {580 43 35 17} hide
2326 code0 {this->dispfont[122]=o;}
2327 }
2328 Fl_Box {} {
2329 label label
2330 image {images/HD24_matrix_123.gif} xywh {580 43 35 17} hide
2331 code0 {this->dispfont[123]=o;}
2332 }
2333 Fl_Box {} {
2334 label label
2335 image {images/HD24_matrix_124.gif} xywh {580 43 35 17} hide
2336 code0 {this->dispfont[124]=o;}
2337 }
2338 Fl_Box {} {
2339 label label
2340 image {images/HD24_matrix_125.gif} xywh {580 43 35 17} hide
2341 code0 {this->dispfont[125]=o;}
2342 }
2343 Fl_Box {} {
2344 label label
2345 image {images/HD24_matrix_126.gif} xywh {580 43 35 17} hide
2346 code0 {this->dispfont[126]=o;}
2347 }
2348 Fl_Box {} {
2349 label label
2350 image {images/HD24_matrix_127.gif} xywh {580 43 35 17} hide
2351 code0 {this->dispfont[127]=o;}
2352 }
2353 Fl_Box {} {
2354 label writeprotect
2355 image {images/HD24_matrix_writeprotected.gif} xywh {590 53 35 17} hide
2356 code0 {this->dispfont[1]=o;}
2357 }
2358 Fl_Box {} {
2359 label writeenable
2360 image {images/HD24_matrix_writeenabled.gif} xywh {600 63 35 17} hide
2361 code0 {this->dispfont[2]=o;}
2362 }
2363 Fl_Box {} {
2364 label {arrow left}
2365 image {images/HD24_matrix_arrowleft.gif} xywh {600 63 35 17} hide
2366 code0 {this->dispfont[3]=o;}
2367 }
2368 Fl_Box {} {
2369 label {arrow right}
2370 image {images/HD24_matrix_arrowright.gif} xywh {610 73 35 17} hide
2371 code0 {this->dispfont[4]=o;}
2372 }
2373 }
2374 }
2375 Fl_Slider locationslider {
2376 callback {hd24song* currsong=(hd24song*)(this->control->song());
2377if (currsong==NULL) return;
2378this->slidermoved=3;
2379long long newpos=(long long)currsong->songlength_in_samples();
2380newpos*=(int)(o->value());
2381newpos=(__uint32)(newpos/1000);
2382control->hd24_transport_goloc(newpos);}
2383 xywh {10 208 595 17} type Horizontal selection_color 41 labelsize 12 align 4 maximum 1000 step 1
2384 code0 {this->slidermoved=0;}
2385 }
2386 Fl_Box {} {
2387 xywh {305 226 300 149} box DOWN_BOX color 8
2388 }
2389 Fl_Button button_setlocate {
2390 label {SET LOC}
2391 callback {control->highlight_setbuttons(o->value());}
2392 tooltip {Set Locate} xywh {420 290 50 20} type Toggle box FLAT_BOX down_box FLAT_BOX color 16 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 5
2393 code0 {o->up_image(button_lrc_up->image()); o->down_image(button_lrc_dn->image());}
2394 class Fl_Image_Toggle_Button
2395 }
2396 Fl_Button button_loopmode {
2397 label {AUTO LOOP}
2398 callback {control->loopmode(button_loopmode->value());}
2399 tooltip {Auto Loop} xywh {310 250 50 20} type Toggle box FLAT_BOX down_box FLAT_BOX color 16 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 5
2400 code0 {o->up_image(button_lrc_up->image()); o->down_image(button_lrc_dn->image());}
2401 class Fl_Image_Toggle_Button
2402 }
2403 Fl_Repeat_Button button_rew {
2404 callback {control->button_rew_call();}
2405 tooltip Rewind image {images/button_rew.gif} xywh {310 330 50 30} box FLAT_BOX labelsize 11 align 16
2406 code0 {o->up_image(o->image()); o->down_image(button_rew_dn->image()); o->image(NULL);}
2407 class Fl_Image_Repeat_Button
2408 }
2409 Fl_Repeat_Button button_ffwd {
2410 callback {control->button_ffwd_call();}
2411 tooltip {F Fwd} image {images/button_ffwd.gif} xywh {370 330 50 30} box FLAT_BOX labelsize 11 align 16
2412 code0 {o->up_image(o->image()); o->down_image(button_ffwd_dn->image()); o->image(NULL);}
2413 class Fl_Image_Repeat_Button
2414 }
2415 Fl_Button button_stop {
2416 callback {if (control!=NULL) control->button_stop_call();}
2417 tooltip Stop image {images/button_stop_uplit.gif} xywh {430 330 50 30} box FLAT_BOX labelsize 11 align 16
2418 code0 {//o->up_image(button_stop_uplit->image()); o->down_image(button_stop_dn->image());}
2419 code1 {o->up_image(o->image()); o->down_image(button_stop_dn->image()); o->image(NULL);}
2420 class Fl_Image_Button
2421 }
2422 Fl_Button button_play {
2423 callback {control->button_play_call();}
2424 tooltip Play image {images/button_play.gif} xywh {490 330 50 30} box FLAT_BOX labelsize 11 align 16
2425 code0 {o->up_image(o->image()); o->down_image(button_play_dn->image()); o->image(NULL);}
2426 class Fl_Image_Button
2427 }
2428 Fl_Box {} {
2429 xywh {475 231 127 84} box BORDER_BOX color 0
2430 }
2431 Fl_Button button_loopstart {
2432 label {LOOP START}
2433 callback {control->handlelocatebutton(hd24song::LOCATEPOS_LOOPSTART);}
2434 tooltip {Loop Start} xywh {485 250 50 20} box FLAT_BOX down_box FLAT_BOX color 16 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 1
2435 code0 {hlbuttons_defaultcolor=o->color(); o->up_image(button_lrc_led_up->image()); o->down_image(button_lrc_led_dn->image());}
2436 class Fl_Image_Button
2437 }
2438 Fl_Button button_loopend {
2439 label {LOOP END}
2440 callback {control->handlelocatebutton(hd24song::LOCATEPOS_LOOPEND);}
2441 tooltip {Loop End} xywh {550 250 50 20} box FLAT_BOX down_box FLAT_BOX color 16 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 9
2442 code0 {o->up_image(button_lrc_led_up->image()); o->down_image(button_lrc_led_dn->image());}
2443 class Fl_Image_Button
2444 }
2445 Fl_Button button_locate0 {
2446 label {LOC 0}
2447 callback {control->audio->hd24_transport_locate((__sint64)0);}
2448 tooltip {Locate 0} xywh {420 250 50 20} box FLAT_BOX color 16 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 5
2449 code0 {o->up_image(button_lrc_up->image()); o->down_image(button_lrc_dn->image());}
2450 class Fl_Image_Button
2451 }
2452 Fl_Button button_rec {
2453 callback {control->button_rec_call();}
2454 tooltip Record image {images/button_rec.gif} xywh {550 330 50 30} type Toggle box FLAT_BOX labelsize 11
2455 code0 {o->up_image(o->image()); o->down_image(button_rec_dn->image()); o->image(NULL);}
2456 class Fl_Image_Toggle_Button
2457 }
2458 Fl_Group channelcanvas {open
2459 xywh {10 15 595 140} box DOWN_BOX color 0
2460 } {
2461 Fl_Group tc1 {open
2462 xywh {15 15 15 135}
2463 code0 {trackchan[0]=o;}
2464 class HD24TrackChannel
2465 } {}
2466 Fl_Group tc2 {open
2467 xywh {15 15 15 135}
2468 code0 {trackchan[1]=o;}
2469 class HD24TrackChannel
2470 } {}
2471 Fl_Group tc3 {open
2472 xywh {15 15 15 135}
2473 code0 {trackchan[2]=o;}
2474 class HD24TrackChannel
2475 } {}
2476 Fl_Group tc4 {open
2477 xywh {15 15 15 135}
2478 code0 {trackchan[3]=o;}
2479 class HD24TrackChannel
2480 } {}
2481 Fl_Group tc5 {open
2482 xywh {15 15 15 135}
2483 code0 {trackchan[4]=o;}
2484 class HD24TrackChannel
2485 } {}
2486 Fl_Group tc6 {open
2487 xywh {15 15 15 135}
2488 code0 {trackchan[5]=o;}
2489 class HD24TrackChannel
2490 } {}
2491 Fl_Group tc7 {open
2492 xywh {15 15 15 135}
2493 code0 {trackchan[6]=o;}
2494 class HD24TrackChannel
2495 } {}
2496 Fl_Group tc8 {open
2497 xywh {15 15 15 135}
2498 code0 {trackchan[7]=o;}
2499 class HD24TrackChannel
2500 } {}
2501 Fl_Group trackinfo1 {open
2502 xywh {15 15 15 135}
2503 code0 {trackinfo[0]=trackinfo1;}
2504 class TrackInfo
2505 } {}
2506 Fl_Group tc9 {open
2507 xywh {15 15 15 135}
2508 code0 {trackchan[8]=o;}
2509 class HD24TrackChannel
2510 } {}
2511 Fl_Group tc10 {open
2512 xywh {15 15 15 135}
2513 code0 {trackchan[9]=o;}
2514 class HD24TrackChannel
2515 } {}
2516 Fl_Group tc11 {open
2517 xywh {15 15 15 135}
2518 code0 {trackchan[10]=o;}
2519 class HD24TrackChannel
2520 } {}
2521 Fl_Group tc12 {open
2522 xywh {15 15 15 135}
2523 code0 {trackchan[11]=o;}
2524 class HD24TrackChannel
2525 } {}
2526 Fl_Group tc13 {open
2527 xywh {15 15 15 135}
2528 code0 {trackchan[12]=o;}
2529 class HD24TrackChannel
2530 } {}
2531 Fl_Group tc14 {open
2532 xywh {15 15 15 135}
2533 code0 {trackchan[13]=o;}
2534 class HD24TrackChannel
2535 } {}
2536 Fl_Group tc15 {open
2537 xywh {15 15 15 135}
2538 code0 {trackchan[14]=o;}
2539 class HD24TrackChannel
2540 } {}
2541 Fl_Group tc16 {open
2542 xywh {15 15 15 135}
2543 code0 {trackchan[15]=o;}
2544 class HD24TrackChannel
2545 } {}
2546 Fl_Group trackinfo2 {open
2547 xywh {15 15 15 135}
2548 code0 {trackinfo[1]=trackinfo2;}
2549 class TrackInfo
2550 } {}
2551 Fl_Group tc17 {open
2552 xywh {15 15 15 135}
2553 code0 {trackchan[16]=o;}
2554 class HD24TrackChannel
2555 } {}
2556 Fl_Group tc18 {open
2557 xywh {15 15 15 135}
2558 code0 {trackchan[17]=o;}
2559 class HD24TrackChannel
2560 } {}
2561 Fl_Group tc19 {open
2562 xywh {15 15 15 135}
2563 code0 {trackchan[18]=o;}
2564 class HD24TrackChannel
2565 } {}
2566 Fl_Group tc20 {open
2567 xywh {15 15 15 135}
2568 code0 {trackchan[19]=o;}
2569 class HD24TrackChannel
2570 } {}
2571 Fl_Group tc21 {open
2572 xywh {15 15 15 135}
2573 code0 {trackchan[20]=o;}
2574 class HD24TrackChannel
2575 } {}
2576 Fl_Group tc22 {open
2577 xywh {15 15 15 135}
2578 code0 {trackchan[21]=o;}
2579 class HD24TrackChannel
2580 } {}
2581 Fl_Group tc23 {open
2582 xywh {15 15 15 135}
2583 code0 {trackchan[22]=o;}
2584 class HD24TrackChannel
2585 } {}
2586 Fl_Group tc24 {open
2587 xywh {15 15 15 135}
2588 code0 {trackchan[23]=o;}
2589 class HD24TrackChannel
2590 } {}
2591 Fl_Group {} {open
2592 xywh {35 40 15 15}
2593 } {}
2594 }
2595 Fl_Button arm1 {
2596 callback {this->control->toggletrackarmed(1);}
2597 tooltip arm xywh {40 155 20 15} labelsize 8 labelcolor 7
2598 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[0]=o;}
2599 class Fl_Image_Button
2600 }
2601 Fl_Button arm2 {
2602 callback {this->control->toggletrackarmed(2);}
2603 tooltip arm xywh {60 155 15 15}
2604 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[1]=o;}
2605 class Fl_Image_Button
2606 }
2607 Fl_Button arm3 {
2608 callback {this->control->toggletrackarmed(3);}
2609 tooltip arm xywh {75 155 15 15}
2610 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[2]=o;}
2611 class Fl_Image_Button
2612 }
2613 Fl_Button arm4 {
2614 callback {this->control->toggletrackarmed(4);}
2615 tooltip arm xywh {90 155 15 15}
2616 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[3]=o;}
2617 class Fl_Image_Button
2618 }
2619 Fl_Button arm5 {
2620 callback {this->control->toggletrackarmed(5);}
2621 tooltip arm xywh {105 155 15 15}
2622 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[4]=o;}
2623 class Fl_Image_Button
2624 }
2625 Fl_Button arm6 {
2626 callback {this->control->toggletrackarmed(6);}
2627 tooltip arm xywh {120 155 15 15}
2628 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[5]=o;}
2629 class Fl_Image_Button
2630 }
2631 Fl_Button arm7 {
2632 callback {this->control->toggletrackarmed(7);}
2633 tooltip arm xywh {135 155 15 15}
2634 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[6]=o;}
2635 class Fl_Image_Button
2636 }
2637 Fl_Button arm8 {
2638 callback {this->control->toggletrackarmed(8);}
2639 tooltip arm xywh {150 155 15 15}
2640 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[7]=o;}
2641 class Fl_Image_Button
2642 }
2643 Fl_Button arm9 {
2644 callback {this->control->toggletrackarmed(9);}
2645 tooltip arm xywh {235 155 15 15}
2646 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[8]=o;}
2647 class Fl_Image_Button
2648 }
2649 Fl_Button arm10 {
2650 callback {this->control->toggletrackarmed(10);}
2651 tooltip arm xywh {250 155 15 15}
2652 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[9]=o;}
2653 class Fl_Image_Button
2654 }
2655 Fl_Button arm11 {
2656 callback {this->control->toggletrackarmed(11);}
2657 tooltip arm xywh {265 155 15 15}
2658 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[10]=o;}
2659 class Fl_Image_Button
2660 }
2661 Fl_Button arm12 {
2662 callback {this->control->toggletrackarmed(12);}
2663 tooltip arm xywh {280 155 15 15}
2664 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[11]=o;}
2665 class Fl_Image_Button
2666 }
2667 Fl_Button arm13 {
2668 callback {this->control->toggletrackarmed(13);}
2669 tooltip arm xywh {295 155 15 15}
2670 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[12]=o;}
2671 class Fl_Image_Button
2672 }
2673 Fl_Button arm14 {
2674 callback {this->control->toggletrackarmed(14);}
2675 tooltip arm xywh {310 155 15 15}
2676 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[13]=o;}
2677 class Fl_Image_Button
2678 }
2679 Fl_Button arm15 {
2680 callback {this->control->toggletrackarmed(15);}
2681 tooltip arm xywh {325 155 15 15}
2682 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[14]=o;}
2683 class Fl_Image_Button
2684 }
2685 Fl_Button arm16 {
2686 callback {this->control->toggletrackarmed(16);}
2687 tooltip arm xywh {340 155 15 15}
2688 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[15]=o;}
2689 class Fl_Image_Button
2690 }
2691 Fl_Button arm17 {
2692 callback {this->control->toggletrackarmed(17);}
2693 tooltip arm xywh {430 155 15 15}
2694 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[16]=o;}
2695 class Fl_Image_Button
2696 }
2697 Fl_Button arm18 {
2698 callback {this->control->toggletrackarmed(18);}
2699 tooltip arm xywh {445 155 15 15}
2700 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[17]=o;}
2701 class Fl_Image_Button
2702 }
2703 Fl_Button arm19 {
2704 callback {this->control->toggletrackarmed(19);}
2705 tooltip arm xywh {460 155 15 15}
2706 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[18]=o;}
2707 class Fl_Image_Button
2708 }
2709 Fl_Button arm20 {
2710 callback {this->control->toggletrackarmed(20);}
2711 tooltip arm xywh {475 155 15 15}
2712 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[19]=o;}
2713 class Fl_Image_Button
2714 }
2715 Fl_Button arm21 {
2716 callback {this->control->toggletrackarmed(21);}
2717 tooltip arm xywh {490 155 15 15}
2718 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[20]=o;}
2719 class Fl_Image_Button
2720 }
2721 Fl_Button arm22 {
2722 callback {this->control->toggletrackarmed(22);}
2723 tooltip arm xywh {505 155 15 15}
2724 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[21]=o;}
2725 class Fl_Image_Button
2726 }
2727 Fl_Button arm23 {
2728 callback {this->control->toggletrackarmed(23);}
2729 tooltip arm xywh {520 155 15 15}
2730 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[22]=o;}
2731 class Fl_Image_Button
2732 }
2733 Fl_Button arm24 {
2734 callback {this->control->toggletrackarmed(24);}
2735 tooltip arm xywh {535 155 15 15}
2736 code0 {o->up_image(button_small_up->image()); o->down_image(button_small_dn->image()); armbutton[23]=o;}
2737 class Fl_Image_Button
2738 }
2739 Fl_Button solo1 {
2740 callback {control->solo(0,o->value());}
2741 xywh {40 175 20 15} selection_color 2
2742 code0 {o->up_image(button_solo_up->image()); o->down_image(button_solo_dn->image()); solobutton[0]=o;}
2743 class Fl_Image_Toggle_Button
2744 }
2745 Fl_Button solo2 {
2746 callback {control->solo(1,o->value());}
2747 xywh {60 175 15 15} selection_color 2
2748 code0 {solobutton[1]=o;}
2749 class Fl_Image_Toggle_Button
2750 }
2751 Fl_Button solo3 {
2752 callback {control->solo(2,o->value());}
2753 xywh {75 175 15 15} selection_color 2
2754 code0 {solobutton[2]=o;}
2755 class Fl_Image_Toggle_Button
2756 }
2757 Fl_Button solo4 {
2758 callback {control->solo(3,o->value());}
2759 xywh {90 175 15 15} selection_color 2
2760 code0 {solobutton[3]=o;}
2761 class Fl_Image_Toggle_Button
2762 }
2763 Fl_Button solo5 {
2764 callback {control->solo(4,o->value());}
2765 xywh {105 175 15 15} selection_color 2
2766 code0 {solobutton[4]=o;}
2767 class Fl_Image_Toggle_Button
2768 }
2769 Fl_Button solo6 {
2770 callback {control->solo(5,o->value());}
2771 xywh {120 175 15 15} selection_color 2
2772 code0 {solobutton[5]=o;}
2773 class Fl_Image_Toggle_Button
2774 }
2775 Fl_Button solo7 {
2776 callback {control->solo(6,o->value());}
2777 xywh {135 175 15 15} selection_color 2
2778 code0 {solobutton[6]=o;}
2779 class Fl_Image_Toggle_Button
2780 }
2781 Fl_Button solo8 {
2782 callback {control->solo(7,o->value());}
2783 xywh {150 175 15 15} selection_color 2
2784 code0 {solobutton[7]=o;}
2785 class Fl_Image_Toggle_Button
2786 }
2787 Fl_Button solo9 {
2788 callback {control->solo(8,o->value());}
2789 xywh {235 175 15 15} selection_color 2
2790 code0 {solobutton[8]=o;}
2791 class Fl_Image_Toggle_Button
2792 }
2793 Fl_Button solo10 {
2794 callback {control->solo(9,o->value());}
2795 xywh {250 175 15 15} selection_color 2
2796 code0 {solobutton[9]=o;}
2797 class Fl_Image_Toggle_Button
2798 }
2799 Fl_Button solo11 {
2800 callback {control->solo(10,o->value());}
2801 xywh {265 175 15 15} selection_color 2
2802 code0 {solobutton[10]=o;}
2803 class Fl_Image_Toggle_Button
2804 }
2805 Fl_Button solo12 {
2806 callback {control->solo(11,o->value());}
2807 xywh {280 175 15 15} selection_color 2
2808 code0 {solobutton[11]=o;}
2809 class Fl_Image_Toggle_Button
2810 }
2811 Fl_Button solo13 {
2812 callback {control->solo(12,o->value());}
2813 xywh {295 175 15 15} selection_color 2
2814 code0 {solobutton[12]=o;}
2815 class Fl_Image_Toggle_Button
2816 }
2817 Fl_Button solo14 {
2818 callback {control->solo(13,o->value());}
2819 xywh {310 175 15 15} selection_color 2
2820 code0 {solobutton[13]=o;}
2821 class Fl_Image_Toggle_Button
2822 }
2823 Fl_Button solo15 {
2824 callback {control->solo(14,o->value());}
2825 xywh {325 175 15 15} selection_color 2
2826 code0 {solobutton[14]=o;}
2827 class Fl_Image_Toggle_Button
2828 }
2829 Fl_Button solo16 {
2830 callback {control->solo(15,o->value());}
2831 xywh {340 175 15 15} selection_color 2
2832 code0 {solobutton[15]=o;}
2833 class Fl_Image_Toggle_Button
2834 }
2835 Fl_Button solo17 {
2836 callback {control->solo(16,o->value());}
2837 xywh {430 175 15 15} selection_color 2
2838 code0 {solobutton[16]=o;}
2839 class Fl_Image_Toggle_Button
2840 }
2841 Fl_Button solo18 {
2842 callback {control->solo(17,o->value());}
2843 xywh {445 175 15 15} selection_color 2
2844 code0 {solobutton[17]=o;}
2845 class Fl_Image_Toggle_Button
2846 }
2847 Fl_Button solo19 {
2848 callback {control->solo(18,o->value());}
2849 xywh {460 175 15 15} selection_color 2
2850 code0 {solobutton[18]=o;}
2851 class Fl_Image_Toggle_Button
2852 }
2853 Fl_Button solo20 {
2854 callback {control->solo(19,o->value());}
2855 xywh {475 175 15 15} selection_color 2
2856 code0 {solobutton[19]=o;}
2857 class Fl_Image_Toggle_Button
2858 }
2859 Fl_Button solo21 {
2860 callback {control->solo(20,o->value());}
2861 xywh {490 175 15 15} selection_color 2
2862 code0 {solobutton[20]=o;}
2863 class Fl_Image_Toggle_Button
2864 }
2865 Fl_Button solo22 {
2866 callback {control->solo(21,o->value());}
2867 xywh {505 175 15 15} selection_color 2
2868 code0 {solobutton[21]=o;}
2869 class Fl_Image_Toggle_Button
2870 }
2871 Fl_Button solo23 {
2872 callback {control->solo(22,o->value());}
2873 xywh {520 175 15 15} selection_color 2
2874 code0 {solobutton[22]=o;}
2875 class Fl_Image_Toggle_Button
2876 }
2877 Fl_Button solo24 {
2878 callback {control->solo(23,o->value());}
2879 xywh {535 175 15 15} selection_color 2
2880 code0 {solobutton[23]=o;}
2881 class Fl_Image_Toggle_Button
2882 }
2883 Fl_Button mute1 {
2884 callback {control->mute(0,o->value());}
2885 xywh {40 192 20 15} selection_color 1
2886 code0 {o->up_image(button_mute_up->image()); o->down_image(button_mute_dn->image()); mutebutton[0]=o;}
2887 class Fl_Image_Toggle_Button
2888 }
2889 Fl_Button mute2 {
2890 callback {control->mute(1,o->value());}
2891 xywh {60 192 15 15} selection_color 1
2892 code0 {mutebutton[1]=o;}
2893 class Fl_Image_Toggle_Button
2894 }
2895 Fl_Button mute3 {
2896 callback {control->mute(2,o->value());}
2897 xywh {75 192 15 15} selection_color 1
2898 code0 {mutebutton[2]=o;}
2899 class Fl_Image_Toggle_Button
2900 }
2901 Fl_Button mute4 {
2902 callback {control->mute(3,o->value());}
2903 xywh {90 192 15 15} selection_color 1
2904 code0 {mutebutton[3]=o;}
2905 class Fl_Image_Toggle_Button
2906 }
2907 Fl_Button mute5 {
2908 callback {control->mute(4,o->value());}
2909 xywh {105 192 15 15} selection_color 1
2910 code0 {mutebutton[4]=o;}
2911 class Fl_Image_Toggle_Button
2912 }
2913 Fl_Button mute6 {
2914 callback {control->mute(5,o->value());}
2915 xywh {120 192 15 15} selection_color 1
2916 code0 {mutebutton[5]=o;}
2917 class Fl_Image_Toggle_Button
2918 }
2919 Fl_Button mute7 {
2920 callback {control->mute(6,o->value());}
2921 xywh {135 192 15 15} selection_color 1
2922 code0 {mutebutton[6]=o;}
2923 class Fl_Image_Toggle_Button
2924 }
2925 Fl_Button mute8 {
2926 callback {control->mute(7,o->value());}
2927 xywh {150 192 15 15} selection_color 1
2928 code0 {mutebutton[7]=o;}
2929 class Fl_Image_Toggle_Button
2930 }
2931 Fl_Button mute9 {
2932 callback {control->mute(8,o->value());}
2933 xywh {235 192 15 15} selection_color 1
2934 code0 {mutebutton[8]=o;}
2935 class Fl_Image_Toggle_Button
2936 }
2937 Fl_Button mute10 {
2938 callback {control->mute(9,o->value());}
2939 xywh {250 192 15 15} selection_color 1
2940 code0 {mutebutton[9]=o;}
2941 class Fl_Image_Toggle_Button
2942 }
2943 Fl_Button mute11 {
2944 callback {control->mute(10,o->value());}
2945 xywh {265 192 15 15} selection_color 1
2946 code0 {mutebutton[10]=o;}
2947 class Fl_Image_Toggle_Button
2948 }
2949 Fl_Button mute12 {
2950 callback {control->mute(11,o->value());}
2951 xywh {280 192 15 15} selection_color 1
2952 code0 {mutebutton[11]=o;}
2953 class Fl_Image_Toggle_Button
2954 }
2955 Fl_Button mute13 {
2956 callback {control->mute(12,o->value());}
2957 xywh {295 192 15 15} selection_color 1
2958 code0 {mutebutton[12]=o;}
2959 class Fl_Image_Toggle_Button
2960 }
2961 Fl_Button mute14 {
2962 callback {control->mute(13,o->value());}
2963 xywh {310 192 15 15} selection_color 1
2964 code0 {mutebutton[13]=o;}
2965 class Fl_Image_Toggle_Button
2966 }
2967 Fl_Button mute15 {
2968 callback {control->mute(14,o->value());}
2969 xywh {325 192 15 15} selection_color 1
2970 code0 {mutebutton[14]=o;}
2971 class Fl_Image_Toggle_Button
2972 }
2973 Fl_Button mute16 {
2974 callback {control->mute(15,o->value());}
2975 xywh {340 192 15 15} selection_color 1
2976 code0 {mutebutton[15]=o;}
2977 class Fl_Image_Toggle_Button
2978 }
2979 Fl_Button mute17 {
2980 callback {control->mute(16,o->value());}
2981 xywh {430 192 15 15} selection_color 1
2982 code0 {mutebutton[16]=o;}
2983 class Fl_Image_Toggle_Button
2984 }
2985 Fl_Button mute18 {
2986 callback {control->mute(17,o->value());}
2987 xywh {445 192 15 15} selection_color 1
2988 code0 {mutebutton[17]=o;}
2989 class Fl_Image_Toggle_Button
2990 }
2991 Fl_Button mute19 {
2992 callback {control->mute(18,o->value());}
2993 xywh {460 192 15 15} selection_color 1
2994 code0 {mutebutton[18]=o;}
2995 class Fl_Image_Toggle_Button
2996 }
2997 Fl_Button mute20 {
2998 callback {control->mute(19,o->value());}
2999 xywh {475 192 15 15} selection_color 1
3000 code0 {mutebutton[19]=o;}
3001 class Fl_Image_Toggle_Button
3002 }
3003 Fl_Button mute21 {
3004 callback {control->mute(20,o->value());}
3005 xywh {490 192 15 15} selection_color 1
3006 code0 {mutebutton[20]=o;}
3007 class Fl_Image_Toggle_Button
3008 }
3009 Fl_Button mute22 {
3010 callback {control->mute(21,o->value());}
3011 xywh {505 192 15 15} selection_color 1
3012 code0 {mutebutton[21]=o;}
3013 class Fl_Image_Toggle_Button
3014 }
3015 Fl_Button mute23 {
3016 callback {control->mute(22,o->value());}
3017 xywh {520 192 15 15} selection_color 1
3018 code0 {mutebutton[22]=o;}
3019 class Fl_Image_Toggle_Button
3020 }
3021 Fl_Button mute24 {
3022 callback {control->mute(23,o->value());}
3023 xywh {535 192 15 15} selection_color 1
3024 code0 {mutebutton[23]=o;}
3025 class Fl_Image_Toggle_Button
3026 }
3027 Fl_Box arm_unarm_all {
3028 callback {hd24song* currsong=this->control->song();
3029if (currsong==NULL) return;
3030
3031bool alltracksarmed=true;
3032for (unsigned int i=1;i<=currsong->logical_channels();i++) {
3033 if (!currsong->trackarmed(i)) {
3034 alltracksarmed=false;
3035 break;
3036 }
3037}
3038bool mustarm=false;
3039if (!alltracksarmed) {
3040 mustarm=true;
3041}
3042for (unsigned int i=1;i<=currsong->logical_channels();i++) {
3043 currsong->trackarmed(i,mustarm);
3044}}
3045 tooltip {Arm tracks} xywh {10 156 10 10} box OVAL_BOX color 1 selection_color 1
3046 class Fl_Button
3047 }
3048 Fl_Box {} {
3049 label S
3050 tooltip Solo xywh {10 176 15 14} color 1 selection_color 1 labelfont 1 labelsize 12
3051 }
3052 Fl_Box {} {
3053 label M
3054 tooltip Mute xywh {10 191 15 14} color 1 selection_color 1 labelfont 1 labelsize 12
3055 }
3056 Fl_Group infodisplay {open
3057 xywh {10 225 295 150} box DOWN_BOX color 0
3058 } {
3059 Fl_Box ho1 {
3060 image {images/7seg_8.gif} xywh {12 234 16 26}
3061 code0 {o->image(i7seg0->image()); o->redraw();}
3062 }
3063 Fl_Box ho2 {
3064 image {images/7seg_8.gif} xywh {27 234 16 26}
3065 code0 {o->image(i7seg0->image()); o->redraw();}
3066 }
3067 Fl_Box mi1 {
3068 image {images/7seg_8.gif} xywh {55 234 16 26}
3069 code0 {o->image(i7seg0->image()); o->redraw();}
3070 }
3071 Fl_Box mi2 {
3072 image {images/7seg_8.gif} xywh {70 234 16 26}
3073 code0 {o->image(i7seg0->image()); o->redraw();}
3074 }
3075 Fl_Box se1 {
3076 image {images/7seg_8.gif} xywh {98 234 16 26}
3077 code0 {o->image(i7seg0->image()); o->redraw();}
3078 }
3079 Fl_Box se2 {
3080 image {images/7seg_8.gif} xywh {113 234 16 26}
3081 code0 {o->image(i7seg0->image()); o->redraw();}
3082 }
3083 Fl_Box fr1 {
3084 image {images/7seg_8.gif} xywh {141 234 16 26}
3085 code0 {o->image(i7seg0->image()); o->redraw();}
3086 }
3087 Fl_Box fr2 {
3088 image {images/7seg_8.gif} xywh {156 234 16 26}
3089 code0 {o->image(i7seg0->image()); o->redraw();}
3090 }
3091 Fl_Box {} {
3092 label H
3093 xywh {42 247 12 14} labelfont 3 labelsize 11 labelcolor 6
3094 }
3095 Fl_Box {} {
3096 label M
3097 xywh {85 247 12 14} labelfont 3 labelsize 11 labelcolor 6
3098 }
3099 Fl_Box {} {
3100 label S
3101 xywh {128 247 12 14} labelfont 3 labelsize 11 labelcolor 6
3102 }
3103 Fl_Box {} {
3104 label F
3105 xywh {171 247 12 14} labelfont 3 labelsize 11 labelcolor 6
3106 }
3107 Fl_Box l1c0 {
3108 image {images/HD24_matrix_realsize.gif} xywh {13 274 20 26}
3109 code0 {this->dispcell[0][0]=o;}
3110 }
3111 Fl_Box l1c1 {
3112 image {images/HD24_matrix_realsize.gif} xywh {31 274 20 26}
3113 code0 {this->dispcell[1][0]=o;}
3114 }
3115 Fl_Box l1c2 {
3116 image {images/HD24_matrix_realsize.gif} xywh {49 274 20 26}
3117 code0 {this->dispcell[2][0]=o;}
3118 }
3119 Fl_Box l1c3 {
3120 image {images/HD24_matrix_realsize.gif} xywh {67 274 20 26}
3121 code0 {this->dispcell[3][0]=o;}
3122 }
3123 Fl_Box l1c4 {
3124 image {images/HD24_matrix_realsize.gif} xywh {85 274 20 26}
3125 code0 {this->dispcell[4][0]=o;}
3126 }
3127 Fl_Box l1c5 {
3128 image {images/HD24_matrix_realsize.gif} xywh {103 274 20 26}
3129 code0 {this->dispcell[5][0]=o;}
3130 }
3131 Fl_Box l1c6 {
3132 image {images/HD24_matrix_realsize.gif} xywh {121 274 20 26}
3133 code0 {this->dispcell[6][0]=o;}
3134 }
3135 Fl_Box l1c7 {
3136 image {images/HD24_matrix_realsize.gif} xywh {139 274 20 26}
3137 code0 {this->dispcell[7][0]=o;}
3138 }
3139 Fl_Box l1c8 {
3140 image {images/HD24_matrix_realsize.gif} xywh {157 274 20 26}
3141 code0 {this->dispcell[8][0]=o;}
3142 }
3143 Fl_Box l1c9 {
3144 image {images/HD24_matrix_realsize.gif} xywh {175 274 20 26}
3145 code0 {this->dispcell[9][0]=o;}
3146 }
3147 Fl_Box l1ca {
3148 image {images/HD24_matrix_realsize.gif} xywh {193 274 20 26}
3149 code0 {this->dispcell[10][0]=o;}
3150 }
3151 Fl_Box l1cb {
3152 image {images/HD24_matrix_realsize.gif} xywh {211 274 20 26}
3153 code0 {this->dispcell[11][0]=o;}
3154 }
3155 Fl_Box l1cc {
3156 image {images/HD24_matrix_realsize.gif} xywh {229 274 20 26}
3157 code0 {this->dispcell[12][0]=o;}
3158 }
3159 Fl_Box l1cd {
3160 image {images/HD24_matrix_realsize.gif} xywh {247 274 20 26}
3161 code0 {this->dispcell[13][0]=o;}
3162 }
3163 Fl_Box l1ce {
3164 image {images/HD24_matrix_realsize.gif} xywh {265 274 20 26}
3165 code0 {this->dispcell[14][0]=o;}
3166 }
3167 Fl_Box l1cf {
3168 image {images/HD24_matrix_realsize.gif} xywh {283 274 20 26}
3169 code0 {this->dispcell[15][0]=o;}
3170 }
3171 Fl_Box l2c0 {
3172 image {images/HD24_matrix_realsize.gif} xywh {12 304 20 26}
3173 code0 {this->dispcell[0][1]=o;}
3174 }
3175 Fl_Box l2c1 {
3176 image {images/HD24_matrix_realsize.gif} xywh {30 304 20 26}
3177 code0 {this->dispcell[1][1]=o;}
3178 }
3179 Fl_Box l2c2 {
3180 image {images/HD24_matrix_realsize.gif} xywh {48 304 20 26}
3181 code0 {this->dispcell[2][1]=o;}
3182 }
3183 Fl_Box l2c3 {
3184 image {images/HD24_matrix_realsize.gif} xywh {66 304 20 26}
3185 code0 {this->dispcell[3][1]=o;}
3186 }
3187 Fl_Box l2c4 {
3188 image {images/HD24_matrix_realsize.gif} xywh {84 304 20 26}
3189 code0 {this->dispcell[4][1]=o;}
3190 }
3191 Fl_Box l2c5 {
3192 image {images/HD24_matrix_realsize.gif} xywh {102 304 20 26}
3193 code0 {this->dispcell[5][1]=o;}
3194 }
3195 Fl_Box l2c6 {
3196 image {images/HD24_matrix_realsize.gif} xywh {120 304 20 26}
3197 code0 {this->dispcell[6][1]=o;}
3198 }
3199 Fl_Box l2c7 {
3200 image {images/HD24_matrix_realsize.gif} xywh {138 304 20 26}
3201 code0 {this->dispcell[7][1]=o;}
3202 }
3203 Fl_Box l2c8 {
3204 image {images/HD24_matrix_realsize.gif} xywh {156 304 20 26}
3205 code0 {this->dispcell[8][1]=o;}
3206 }
3207 Fl_Box l2c9 {
3208 image {images/HD24_matrix_realsize.gif} xywh {174 304 20 26}
3209 code0 {this->dispcell[9][1]=o;}
3210 }
3211 Fl_Box l2ca {
3212 image {images/HD24_matrix_realsize.gif} xywh {192 304 20 26}
3213 code0 {this->dispcell[10][1]=o;}
3214 }
3215 Fl_Box l2cb {
3216 image {images/HD24_matrix_realsize.gif} xywh {210 304 20 26}
3217 code0 {this->dispcell[11][1]=o;}
3218 }
3219 Fl_Box l2cc {
3220 image {images/HD24_matrix_realsize.gif} xywh {228 304 20 26}
3221 code0 {this->dispcell[12][1]=o;}
3222 }
3223 Fl_Box l2cd {
3224 image {images/HD24_matrix_realsize.gif} xywh {246 304 20 26}
3225 code0 {this->dispcell[13][1]=o;}
3226 }
3227 Fl_Box l2ce {
3228 image {images/HD24_matrix_realsize.gif} xywh {264 304 20 26}
3229 code0 {this->dispcell[14][1]=o;}
3230 }
3231 Fl_Box l2cf {
3232 image {images/HD24_matrix_realsize.gif} xywh {282 304 20 26}
3233 code0 {this->dispcell[15][1]=o;}
3234 }
3235 Fl_Box autoanythingled {
3236 label AUTO
3237 xywh {193 233 65 8} box FLAT_BOX color 93 labelfont 1 labelsize 8 hide
3238 }
3239 Fl_Box autoplayled {
3240 label PLAY
3241 xywh {215 242 24 8} box FLAT_BOX color 93 labelfont 1 labelsize 8 hide
3242 }
3243 Fl_Box autortnled {
3244 label RTN
3245 xywh {240 242 18 8} box FLAT_BOX color 93 labelfont 1 labelsize 8 hide
3246 }
3247 Fl_Box autorecled {
3248 label REC
3249 xywh {193 242 21 8} box FLAT_BOX color 1 labelfont 1 labelsize 8 align 16 hide
3250 }
3251 Fl_Box rehearseled {
3252 label REHEARSE
3253 xywh {193 251 65 8} box FLAT_BOX color 1 labelfont 1 labelsize 8
3254 }
3255 Fl_Box pitchled {
3256 label PITCH
3257 xywh {260 242 40 8} box FLAT_BOX color 6 labelfont 1 labelsize 8 hide
3258 }
3259 }
3260 Fl_Button button_rehearse {
3261 label REHEARSE
3262 callback {control->button_rehearse_call();}
3263 tooltip {Set Locate} xywh {310 290 50 20} type Toggle box FLAT_BOX down_box FLAT_BOX color 47 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 5 deactivate
3264 code0 {o->up_image(button_lrc_up->image()); o->down_image(button_lrc_dn->image());}
3265 class Fl_Image_Toggle_Button
3266 }
3267 Fl_Button button_punchin {
3268 label {PUNCH IN}
3269 callback {control->handlelocatebutton(hd24song::LOCATEPOS_PUNCHIN);}
3270 tooltip {Set Locate} xywh {485 290 50 20} box FLAT_BOX down_box FLAT_BOX color 47 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 1
3271 code0 {o->up_image(button_lrc_led_up->image()); o->down_image(button_lrc_led_dn->image());}
3272 class Fl_Image_Button
3273 }
3274 Fl_Button button_punchout {
3275 label {PUNCH OUT}
3276 callback {control->handlelocatebutton(hd24song::LOCATEPOS_PUNCHOUT);}
3277 tooltip {Set Locate} xywh {550 290 50 20} box FLAT_BOX down_box FLAT_BOX color 47 selection_color 18 labelfont 1 labelsize 9 labelcolor 7 align 9
3278 code0 {o->up_image(button_lrc_led_up->image()); o->down_image(button_lrc_led_dn->image());}
3279 class Fl_Image_Button
3280 }
3281 Fl_Button button_peakmode {
3282 label {Peak
3283mode}
3284 callback {this->currpeakmode=((this->currpeakmode)+1)%3;
3285
3286for (unsigned int i=0;i<MAXCHANNELS;i++) {
3287 this->trackchan[i]->peakmode(this->currpeakmode);
3288}
3289switch (this->currpeakmode)
3290{
3291 case 0: // "No" "Peak Hold"
3292 dispwrite(0," No "
3293 " Peak Hold ",2000);
3294 break;
3295 case 1: // "Momentary" "Peak Hold"
3296 dispwrite(0," Momentary "
3297 " Peak Hold ",2000);
3298 break;
3299 case 2: // "Continuous" "Peak Hold"
3300 dispwrite(0," Continuous "
3301 " Peak Hold ",2000);
3302 break;
3303 default:
3304 // ???????
3305 break;
3306}}
3307 tooltip arm xywh {10 375 50 30} color 8 selection_color 8 labelfont 1 labelsize 10 labelcolor 7
3308 code0 {o->clear_visible_focus();}
3309 class Fl_Button
3310 }
3311 Fl_Button button_peakclear {
3312 label {Peak
3313clear}
3314 callback {this->currpeakmode=((this->currpeakmode)+1)%3;
3315
3316for (unsigned int i=0;i<MAXCHANNELS;i++) {
3317 this->trackchan[i]->peakreset();
3318}}
3319 tooltip arm xywh {60 375 50 30} color 8 selection_color 8 labelfont 1 labelsize 10 labelcolor 7
3320 code0 {o->clear_visible_focus();}
3321 class Fl_Button
3322 }
3323 Fl_Button button_autoinput {
3324 label {Auto
3325input}
3326 callback {/*
3327if (currenthd24==NULL) return;
3328if (button_autoinput->value()==1) {
3329 currenthd24->setautoinput(true);
3330} else {
3331 currenthd24->setautoinput(false);
3332}
3333*/}
3334 tooltip arm xywh {110 375 45 30} type Toggle color 8 selection_color 59 labelfont 1 labelsize 10 labelcolor 7
3335 code0 {o->clear_visible_focus();}
3336 class Fl_Button
3337 }
3338 Fl_Button button_allinput {
3339 label {All
3340input}
3341 callback {/*
3342if (currenthd24==NULL) return;
3343if (button_allinput->value()==0) {
3344 currenthd24->setallinput(false);
3345} else {
3346 currenthd24->setallinput(true);
3347}
3348*/}
3349 tooltip arm xywh {155 375 45 30} type Toggle color 8 selection_color 59 labelfont 1 labelsize 10 labelcolor 7
3350 code0 {o->clear_visible_focus();}
3351 class Fl_Button
3352 }
3353 Fl_Choice stereoinmap {
3354 label {Stereo input mapping} open
3355 xywh {463 390 140 20} down_box BORDER_BOX labelsize 12 align 5 textsize 12 deactivate
3356 } {
3357 MenuItem {} {
3358 label Normal
3359 xywh {5 5 36 21} labelsize 12
3360 }
3361 MenuItem {} {
3362 label {Swap Left and Right}
3363 xywh {15 15 36 21} labelsize 12
3364 }
3365 MenuItem {} {
3366 label {Mix to mono}
3367 xywh {15 15 36 21} labelsize 12
3368 }
3369 MenuItem {} {
3370 label {Use Left only}
3371 xywh {25 25 36 21} labelsize 12
3372 }
3373 MenuItem {} {
3374 label {Use Right only}
3375 xywh {35 35 36 21} labelsize 12
3376 }
3377 }
3378 Fl_Roller {} {
3379 label {Drag to Jog}
3380 callback {// scrubwheel calls button_scrub_call()}
3381 xywh {310 390 110 20} type Horizontal labelsize 12 align 1 minimum -1 step 2
3382 code0 {o->setui(this);}
3383 class ScrubWheel
3384 }
3385 }
3386 }
3387 decl {/* === Audio/transport ===================================================== */} {}
3388 decl {int hlbuttons_defaultcolor;} {public
3389 }
3390 Function {highlight_setbuttons(int value)} {open return_type void
3391 } {
3392 code {if (value==1) {
3393 if (button_loopstart!=NULL) {
3394 button_loopstart->up_image(button_lrc_led_on_up->image());
3395 button_loopstart->down_image(button_lrc_led_on_dn->image());
3396 }
3397 if (button_loopend!=NULL) {
3398 button_loopend->up_image(button_lrc_led_on_up->image());
3399 button_loopend->down_image(button_lrc_led_on_dn->image());
3400 }
3401 if (button_punchin!=NULL) {
3402 button_punchin->up_image(button_lrc_led_on_up->image());
3403 button_punchin->down_image(button_lrc_led_on_dn->image());
3404 }
3405 if (button_punchout!=NULL) {
3406 button_punchout->up_image(button_lrc_led_on_up->image());
3407 button_punchout->down_image(button_lrc_led_on_dn->image());
3408 }
3409} else {
3410 button_loopstart->up_image(button_lrc_led_up->image());
3411 button_loopstart->down_image(button_lrc_led_dn->image());
3412 button_loopend->up_image(button_lrc_led_up->image());
3413 button_loopend->down_image(button_lrc_led_dn->image());
3414 button_punchin->up_image(button_lrc_led_up->image());
3415 button_punchin->down_image(button_lrc_led_dn->image());
3416 button_punchout->up_image(button_lrc_led_up->image());
3417 button_punchout->down_image(button_lrc_led_dn->image());
3418}
3419 if (button_punchout!=NULL) { button_punchout->redraw(); }
3420 if (button_punchin!=NULL) { button_punchin->redraw(); }
3421 if (button_loopstart!=NULL) { button_loopstart->redraw(); }
3422 if (button_loopend!=NULL) { button_loopend->redraw();}} {}
3423 }
3424 Function {poll_callback(void* user)} {open return_type {static void}
3425 } {
3426 code {//HD24UserInterface* mythis=(HD24UserInterface*)user;
3427RecorderUI* mythis=(RecorderUI*)user;
3428int visible=0;
3429 if (mythis->recordergroup->visible())
3430 {
3431 visible=1;
3432 } else {
3433 visible=0;
3434 }
3435
3436
3437if (mythis->control->ready()!=1) { return; }
3438
3439if (mythis->dispwritecountdown>0)
3440{
3441 mythis->dispwritecountdown--;
3442 if (mythis->dispwritecountdown==0) {
3443 mythis->disprestore();
3444 }
3445}
3446
3447if (mythis->busy!=1) {
3448 mythis->busy=1;
3449 mythis->blinkcounter=(mythis->blinkcounter+1)%BLINKRATE;
3450
3451 if (visible==1) {
3452 for (unsigned int i=0;i<MAXCHANNELS;i++) {
3453 mythis->trackchan[i]->setval(mythis->control->data->trackpeak[i]);
3454 }
3455
3456 Fl_Image* oldimg;
3457 Fl_Image* newimg=NULL;
3458
3459 string* dur=NULL;
3460 hd24song* mycurrsong=mythis->control->song();
3461 if (mycurrsong!=NULL) {
3462 dur=mycurrsong->display_cursor();
3463 } else {
3464 dur=new string("00:00:00.00");
3465 }
3466
3467
3468 oldimg=mythis->ho1->image();
3469 mythis->ho1->image(mythis->i7seg[dur->c_str()[0]-'0']->image());
3470 if (newimg!=oldimg) mythis->ho1->redraw();
3471
3472 oldimg=mythis->ho2->image();
3473 mythis->ho2->image(mythis->i7seg[dur->c_str()[1]-'0']->image());
3474 if (newimg!=oldimg) mythis->ho2->redraw();
3475
3476 oldimg=mythis->mi1->image();
3477 mythis->mi1->image(mythis->i7seg[dur->c_str()[3]-'0']->image());
3478 if (newimg!=oldimg) mythis->mi1->redraw();
3479
3480 oldimg=mythis->mi2->image();
3481 mythis->mi2->image(mythis->i7seg[dur->c_str()[4]-'0']->image());
3482 if (newimg!=oldimg) mythis->mi2->redraw();
3483
3484 oldimg=mythis->se1->image();
3485 mythis->se1->image(mythis->i7seg[dur->c_str()[6]-'0']->image());
3486 if (newimg!=oldimg) mythis->se1->redraw();
3487
3488 oldimg=mythis->se2->image();
3489 mythis->se2->image(mythis->i7seg[dur->c_str()[7]-'0']->image());
3490 if (newimg!=oldimg) mythis->se2->redraw();
3491 oldimg=mythis->fr1->image();
3492 mythis->fr1->image(mythis->i7seg[dur->c_str()[9]-'0']->image());
3493 if (newimg!=oldimg) mythis->fr1->redraw();
3494
3495 oldimg=mythis->fr2->image();
3496 mythis->fr2->image(mythis->i7seg[dur->c_str()[10]-'0']->image());
3497 if (newimg!=oldimg) mythis->fr2->redraw();
3498 if ((mythis->mustdisplaytimer) && (mycurrsong !=NULL))
3499 {
3500
3501 // mythis->setstatus(*dur);
3502 __uint32 currloc=mycurrsong->cursorpos();
3503 if (mycurrsong->songlength_in_samples() >0) {
3504 currloc=mycurrsong->cursorpos()/(mycurrsong->songlength_in_samples()/1000);
3505 } else {
3506 currloc=0;
3507 }
3508 if (mythis->slidermoved!=0) {
3509 mythis->slidermoved--;
3510 } else {
3511 mythis->locationslider->value(currloc);
3512 }
3513 }
3514 delete (dur);
3515 }
3516
3517}
3518mythis->busy=0;
3519//Fl::add_timeout(TIMEOUT,poll_callback,user);
3520
3521AudioSystem* audio=mythis->control->audio;
3522
3523if (!audio->isinitialized()) return;
3524if (!audio->mustloop()) return;
3525audio->hd24_transport_locate((__sint64)(audio->looppos()));
3526audio->mustloop(false);
3527audio->looppos(0);} {}
3528 }
3529 Function {fl_check()} {open return_type void
3530 } {
3531 code {Fl::check();} {}
3532 }
3533 decl {int busy;} {public
3534 }
3535 decl {friend class ScrubWheel;} {}
3536 decl {int uiredrawcount; /* to limit refreshing UI */} {public
3537 }
3538 Function {finish()} {open return_type void
3539 } {
3540 code {if (this==NULL) return;
3541
3542this->control->button_stop_call();} {}
3543 }
3544 Function {button_light(void* button,bool lit)} {open return_type void
3545 } {
3546 code {if (button==NULL) return;
3547if (((Fl_Image_Button*)button)==button_stop)
3548{
3549 if (lit==1)
3550 {
3551 button_stop->up_image(button_stop_uplit->image());
3552 button_stop->down_image(button_stop_dn->image());
3553 }
3554 else
3555 {
3556 button_stop->up_image(button_stop_up->image());
3557 button_stop->down_image(button_stop_dn->image());
3558 }
3559 button_stop->redraw();
3560 return;
3561}} {}
3562 }
3563 Function {button_up(void* button)} {open return_type void
3564 } {
3565 code {if (button==NULL)
3566{
3567 return;
3568}
3569
3570if ((void*)button==(void*)button_stop)
3571{
3572 button_stop->value(0);
3573 button_stop->redraw();
3574 return;
3575}
3576if ((void*)button==(void*)button_play)
3577{
3578 button_play->value(0);
3579 button_play->redraw();
3580 return;
3581}
3582if ((void*)button==(void*)button_rec)
3583{
3584 button_rec->value(0);
3585 button_rec->redraw();
3586 return;
3587}
3588if ((void*)button==(void*)button_rew)
3589{
3590 button_rew->value(0);
3591 button_rew->redraw();
3592 return;
3593}
3594if ((void*)button==(void*)button_ffwd)
3595{
3596 button_ffwd->value(0);
3597 button_ffwd->redraw();
3598 return;
3599}} {}
3600 }
3601 Function {button_down(void* button)} {open return_type void
3602 } {
3603 code {if (button==NULL)
3604{
3605 return;
3606}
3607
3608if ((void*)button==(void*)button_stop)
3609{
3610 button_stop->value(1);
3611 button_stop->redraw();
3612 return;
3613}
3614if ((void*)button==(void*)button_play)
3615{
3616 button_play->value(1);
3617 button_play->redraw();
3618 return;
3619}
3620if ((void*)button==(void*)button_rec)
3621{
3622 button_rec->value(1);
3623 button_rec->redraw();
3624 return;
3625}
3626if ((void*)button==(void*)button_rew)
3627{
3628 button_rew->value(1);
3629 button_rew->redraw();
3630 return;
3631}
3632if ((void*)button==(void*)button_ffwd)
3633{
3634 button_ffwd->value(1);
3635 button_ffwd->redraw();
3636 return;
3637}} {}
3638 }
3639}