00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "jdkmidi/world.h"
00026
00027 #include "jdkmidi/showcontrolhandler.h"
00028
00029 namespace jdkmidi
00030 {
00031
00032
00033 MIDISCHandle::MIDISCHandle()
00034 {
00035 }
00036
00037 MIDISCHandle::~MIDISCHandle()
00038 {
00039 }
00040
00041
00042 bool MIDISCHandle::Dispatch( const MIDIShowControlPacket &p )
00043 {
00044 bool e;
00045
00046 switch( p.GetCommand() )
00047 {
00048 case MIDI_SC_GO:
00049 if( p.GetHasQPath() )
00050 e=Go( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00051 else if( p.GetHasQList() )
00052 e=Go( p.GetQNumber(), p.GetQList() );
00053 else if( p.GetHasQNumber() )
00054 e=Go( p.GetQNumber() );
00055 else
00056 e=Go();
00057 break;
00058 case MIDI_SC_STOP:
00059 if( p.GetHasQPath() )
00060 e=Stop( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00061 else if( p.GetHasQList() )
00062 e=Stop( p.GetQNumber(), p.GetQList() );
00063 else if( p.GetHasQNumber() )
00064 e=Stop( p.GetQNumber() );
00065 else
00066 e=Stop();
00067 break;
00068 case MIDI_SC_RESUME:
00069 if( p.GetHasQPath() )
00070 e=Resume( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00071 else if( p.GetHasQList() )
00072 e=Resume( p.GetQNumber(), p.GetQList() );
00073 else if( p.GetHasQNumber() )
00074 e=Resume( p.GetQNumber() );
00075 else
00076 e=Resume();
00077 break;
00078 case MIDI_SC_LOAD:
00079 if( p.GetHasQPath() )
00080 e=Load( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00081 else if( p.GetHasQList() )
00082 e=Load( p.GetQNumber(), p.GetQList() );
00083 else
00084 e=Load( p.GetQNumber() );
00085 break;
00086 case MIDI_SC_GO_OFF:
00087 if( p.GetHasQPath() )
00088 e=GoOff( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00089 else if( p.GetHasQList() )
00090 e=GoOff( p.GetQNumber(), p.GetQList() );
00091 else if( p.GetHasQNumber() )
00092 e=GoOff( p.GetQNumber() );
00093 else
00094 e=GoOff();
00095 break;
00096 case MIDI_SC_GO_JAM:
00097 if( p.GetHasQPath() )
00098 e=GoJam( p.GetQNumber(), p.GetQList(), p.GetQPath() );
00099 else if( p.GetHasQList() )
00100 e=GoJam( p.GetQNumber(), p.GetQList() );
00101 else if( p.GetHasQNumber() )
00102 e=GoJam( p.GetQNumber() );
00103 else
00104 e=GoJam();
00105 break;
00106 case MIDI_SC_TIMED_GO:
00107 if( p.GetHasQPath() )
00108 e=TimedGo(
00109 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00110 p.GetFrames(), p.GetFractFrames(),
00111 p.GetQNumber(), p.GetQList(), p.GetQPath()
00112 );
00113 else if( p.GetHasQList() )
00114 e=TimedGo(
00115 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00116 p.GetFrames(), p.GetFractFrames(),
00117 p.GetQNumber(), p.GetQList()
00118 );
00119 else if( p.GetHasQNumber() )
00120 e=TimedGo(
00121 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00122 p.GetFrames(), p.GetFractFrames(),
00123 p.GetQNumber() );
00124 else
00125 e=TimedGo(
00126 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00127 p.GetFrames(), p.GetFractFrames()
00128 );
00129 break;
00130 case MIDI_SC_SET:
00131
00132 if( !p.GetHasTime() )
00133 {
00134 e=Set( p.GetControlNum(), p.GetControlVal() );
00135 }
00136 else
00137 {
00138 e=Set(
00139 p.GetControlNum(), p.GetControlVal(),
00140 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00141 p.GetFrames(), p.GetFractFrames()
00142 );
00143 }
00144 break;
00145 case MIDI_SC_FIRE:
00146 e=Fire( (uchar)p.GetMacroNum() );
00147 break;
00148 case MIDI_SC_ALL_OFF:
00149 e=AllOff();
00150 break;
00151 case MIDI_SC_RESTORE:
00152 e=Restore();
00153 break;
00154 case MIDI_SC_RESET:
00155 e=Reset();
00156 break;
00157 case MIDI_SC_STANDBY_PLUS:
00158 if( p.GetHasQList() )
00159 e=StandbyPlus( p.GetQList() );
00160 else
00161 e=StandbyPlus();
00162 break;
00163 case MIDI_SC_STANDBY_MINUS:
00164 if( p.GetHasQList() )
00165 e=StandbyMinus( p.GetQList() );
00166 else
00167 e=StandbyMinus();
00168 break;
00169 case MIDI_SC_SEQUENCE_PLUS:
00170 if( p.GetHasQList() )
00171 e=SequencePlus( p.GetQList() );
00172 else
00173 e=SequencePlus();
00174 break;
00175 case MIDI_SC_SEQUENCE_MINUS:
00176 if( p.GetHasQList() )
00177 e=SequenceMinus( p.GetQList() );
00178 else
00179 e=SequenceMinus();
00180 break;
00181 case MIDI_SC_START_CLOCK:
00182 if( p.GetHasQList() )
00183 e=StartClock( p.GetQList() );
00184 else
00185 e=StartClock();
00186 break;
00187 case MIDI_SC_STOP_CLOCK:
00188 if( p.GetHasQList() )
00189 e=StopClock( p.GetQList() );
00190 else
00191 e=StopClock();
00192 break;
00193 case MIDI_SC_ZERO_CLOCK:
00194 if( p.GetHasQList() )
00195 e=ZeroClock( p.GetQList() );
00196 else
00197 e=ZeroClock();
00198 break;
00199 case MIDI_SC_MTC_CHASE_ON:
00200 if( p.GetHasQList() )
00201 e=MTCChaseOn( p.GetQList() );
00202 else
00203 e=MTCChaseOn();
00204 break;
00205 case MIDI_SC_MTC_CHASE_OFF:
00206 if( p.GetHasQList() )
00207 e=MTCChaseOff( p.GetQList() );
00208 else
00209 e=MTCChaseOff();
00210 break;
00211 case MIDI_SC_SET_CLOCK:
00212 if( p.GetHasQList() )
00213 e=SetClock(
00214 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00215 p.GetFrames(), p.GetFractFrames(),
00216 p.GetQList()
00217 );
00218 else
00219 e=SetClock(
00220 p.GetHours(), p.GetMinutes(), p.GetSeconds(),
00221 p.GetFrames(), p.GetFractFrames()
00222 );
00223
00224 case MIDI_SC_OPEN_Q_LIST:
00225 e=OpenQList( p.GetQList() );
00226 break;
00227 case MIDI_SC_CLOSE_Q_LIST:
00228 e=CloseQList( p.GetQList() );
00229 break;
00230 case MIDI_SC_OPEN_Q_PATH:
00231 e=OpenQPath( p.GetQPath() );
00232 break;
00233 case MIDI_SC_CLOSE_Q_PATH:
00234 e=CloseQPath( p.GetQPath() );
00235 break;
00236 default:
00237 e=false;
00238
00239 break;
00240 }
00241
00242 return e;
00243 }
00244
00245
00246 bool MIDISCHandle::Go()
00247 {
00248 bool e;
00249 e=false;
00250
00251 return e;
00252 }
00253
00254 bool MIDISCHandle::Go( const MIDICue & q_number )
00255 {
00256 bool e;
00257 e=false;
00258
00259 return e;
00260 }
00261
00262
00263 bool MIDISCHandle::Go( const MIDICue & q_number, const MIDICue & q_list )
00264 {
00265 bool e;
00266 e=false;
00267
00268 return e;
00269 }
00270
00271
00272 bool MIDISCHandle::Go( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00273 {
00274 bool e;
00275 e=false;
00276
00277 return e;
00278 }
00279
00280
00281 bool MIDISCHandle::Stop()
00282 {
00283 bool e;
00284 e=false;
00285
00286 return e;
00287 }
00288
00289
00290 bool MIDISCHandle::Stop( const MIDICue & q_number )
00291 {
00292 bool e;
00293 e=false;
00294
00295 return e;
00296 }
00297
00298
00299 bool MIDISCHandle::Stop( const MIDICue & q_number, const MIDICue & q_list )
00300 {
00301 bool e;
00302 e=false;
00303
00304 return e;
00305 }
00306
00307
00308 bool MIDISCHandle::Stop( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00309 {
00310 bool e;
00311 e=false;
00312
00313 return e;
00314 }
00315
00316
00317 bool MIDISCHandle::Resume()
00318 {
00319 bool e;
00320 e=false;
00321
00322 return e;
00323 }
00324
00325
00326 bool MIDISCHandle::Resume( const MIDICue & q_number )
00327 {
00328 bool e;
00329 e=false;
00330
00331 return e;
00332 }
00333
00334
00335 bool MIDISCHandle::Resume( const MIDICue & q_number, const MIDICue & q_list )
00336 {
00337 bool e;
00338 e=false;
00339
00340 return e;
00341 }
00342
00343
00344 bool MIDISCHandle::Resume( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00345 {
00346 bool e;
00347 e=false;
00348
00349 return e;
00350 }
00351
00352
00353 bool MIDISCHandle::TimedGo(
00354 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff
00355 )
00356 {
00357 bool e;
00358 e=false;
00359
00360 return e;
00361 }
00362
00363
00364 bool MIDISCHandle::TimedGo(
00365 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00366 const MIDICue & q_number
00367 )
00368 {
00369 bool e;
00370 e=false;
00371
00372 return e;
00373 }
00374
00375
00376 bool MIDISCHandle::TimedGo(
00377 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00378 const MIDICue & q_number, const MIDICue & q_list
00379 )
00380 {
00381 bool e;
00382 e=false;
00383
00384 return e;
00385 }
00386
00387
00388
00389 bool MIDISCHandle::TimedGo(
00390 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00391 const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path
00392 )
00393 {
00394 bool e;
00395 e=false;
00396
00397 return e;
00398 }
00399
00400
00401
00402 bool MIDISCHandle::Load( const MIDICue & q_number )
00403 {
00404 bool e;
00405 e=false;
00406
00407 return e;
00408 }
00409
00410
00411 bool MIDISCHandle::Load( const MIDICue & q_number, const MIDICue & q_list )
00412 {
00413 bool e;
00414 e=false;
00415
00416 return e;
00417 }
00418
00419
00420 bool MIDISCHandle::Load( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00421 {
00422 bool e;
00423 e=false;
00424
00425 return e;
00426 }
00427
00428
00429 bool MIDISCHandle::Set( ulong ctrl_num, ulong ctrl_val )
00430 {
00431 bool e;
00432 e=false;
00433
00434 return e;
00435 }
00436
00437
00438
00439 bool MIDISCHandle::Set(
00440 ulong ctrl_num,
00441 ulong ctrl_val,
00442 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff
00443 )
00444 {
00445 bool e;
00446 e=false;
00447
00448 return e;
00449 }
00450
00451
00452
00453 bool MIDISCHandle::Fire( uchar macro_num )
00454 {
00455 bool e;
00456 e=false;
00457
00458 return e;
00459 }
00460
00461
00462 bool MIDISCHandle::AllOff()
00463 {
00464 bool e;
00465 e=false;
00466
00467 return e;
00468 }
00469
00470
00471 bool MIDISCHandle::Restore()
00472 {
00473 bool e;
00474 e=false;
00475
00476 return e;
00477 }
00478
00479
00480 bool MIDISCHandle::Reset()
00481 {
00482 bool e;
00483 e=false;
00484
00485 return e;
00486 }
00487
00488
00489 bool MIDISCHandle::GoOff()
00490 {
00491 bool e;
00492 e=false;
00493
00494 return e;
00495 }
00496
00497
00498 bool MIDISCHandle::GoOff( const MIDICue & q_number )
00499 {
00500 bool e;
00501 e=false;
00502
00503 return e;
00504 }
00505
00506
00507 bool MIDISCHandle::GoOff( const MIDICue & q_number, const MIDICue & q_list )
00508 {
00509 bool e;
00510 e=false;
00511
00512 return e;
00513 }
00514
00515
00516 bool MIDISCHandle::GoOff( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00517 {
00518 bool e;
00519 e=false;
00520
00521 return e;
00522 }
00523
00524
00525 bool MIDISCHandle::GoJam()
00526 {
00527 bool e;
00528 e=false;
00529
00530 return e;
00531 }
00532
00533
00534 bool MIDISCHandle::GoJam( const MIDICue & q_number )
00535 {
00536 bool e;
00537 e=false;
00538
00539 return e;
00540 }
00541
00542
00543 bool MIDISCHandle::GoJam( const MIDICue & q_number, const MIDICue & q_list )
00544 {
00545 bool e;
00546 e=false;
00547
00548 return e;
00549 }
00550
00551
00552 bool MIDISCHandle::GoJam( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00553 {
00554 bool e;
00555 e=false;
00556
00557 return e;
00558 }
00559
00560
00561 bool MIDISCHandle::StandbyPlus()
00562 {
00563 bool e;
00564 e=false;
00565
00566 return e;
00567 }
00568
00569
00570 bool MIDISCHandle::StandbyPlus( const MIDICue & q_list )
00571 {
00572 bool e;
00573 e=false;
00574
00575 return e;
00576 }
00577
00578
00579 bool MIDISCHandle::StandbyMinus()
00580 {
00581 bool e;
00582 e=false;
00583
00584 return e;
00585 }
00586
00587
00588 bool MIDISCHandle::StandbyMinus( const MIDICue & q_list )
00589 {
00590 bool e;
00591 e=false;
00592
00593 return e;
00594 }
00595
00596
00597 bool MIDISCHandle::SequencePlus()
00598 {
00599 bool e;
00600 e=false;
00601
00602 return e;
00603 }
00604
00605
00606 bool MIDISCHandle::SequencePlus( const MIDICue & q_list )
00607 {
00608 bool e;
00609 e=false;
00610
00611 return e;
00612 }
00613
00614
00615 bool MIDISCHandle::SequenceMinus()
00616 {
00617 bool e;
00618 e=false;
00619
00620 return e;
00621 }
00622
00623
00624 bool MIDISCHandle::SequenceMinus( const MIDICue & q_list )
00625 {
00626 bool e;
00627 e=false;
00628
00629 return e;
00630 }
00631
00632
00633 bool MIDISCHandle::StartClock()
00634 {
00635 bool e;
00636 e=false;
00637
00638 return e;
00639 }
00640
00641
00642 bool MIDISCHandle::StartClock( const MIDICue & q_list )
00643 {
00644 bool e;
00645 e=false;
00646
00647 return e;
00648 }
00649
00650
00651 bool MIDISCHandle::StopClock()
00652 {
00653 bool e;
00654 e=false;
00655
00656 return e;
00657 }
00658
00659
00660 bool MIDISCHandle::StopClock( const MIDICue & q_list )
00661 {
00662 bool e;
00663 e=false;
00664
00665 return e;
00666 }
00667
00668
00669 bool MIDISCHandle::ZeroClock()
00670 {
00671 bool e;
00672 e=false;
00673
00674 return e;
00675 }
00676
00677
00678 bool MIDISCHandle::ZeroClock( const MIDICue & q_list )
00679 {
00680 bool e;
00681 e=false;
00682
00683 return e;
00684 }
00685
00686
00687 bool MIDISCHandle::SetClock(
00688 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff
00689 )
00690 {
00691 bool e;
00692 e=false;
00693
00694 return e;
00695 }
00696
00697
00698 bool MIDISCHandle::SetClock(
00699 uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00700 const MIDICue & q_list
00701 )
00702 {
00703 bool e;
00704 e=false;
00705
00706 return e;
00707 }
00708
00709
00710 bool MIDISCHandle::MTCChaseOn()
00711 {
00712 bool e;
00713 e=false;
00714
00715 return e;
00716 }
00717
00718
00719 bool MIDISCHandle::MTCChaseOn( const MIDICue & q_list )
00720 {
00721 bool e;
00722 e=false;
00723
00724 return e;
00725 }
00726
00727
00728 bool MIDISCHandle::MTCChaseOff()
00729 {
00730 bool e;
00731 e=false;
00732
00733 return e;
00734 }
00735
00736
00737 bool MIDISCHandle::MTCChaseOff( const MIDICue & q_list )
00738 {
00739 bool e;
00740 e=false;
00741
00742 return e;
00743 }
00744
00745
00746 bool MIDISCHandle::OpenQList( const MIDICue & q_list )
00747 {
00748 bool e;
00749 e=false;
00750 return e;
00751 }
00752
00753
00754 bool MIDISCHandle::CloseQList( const MIDICue & q_list )
00755 {
00756 bool e;
00757 e=false;
00758 return e;
00759 }
00760
00761
00762 bool MIDISCHandle::OpenQPath( const MIDICue & q_path )
00763 {
00764 bool e;
00765 e=false;
00766 return e;
00767 }
00768
00769
00770 bool MIDISCHandle::CloseQPath( const MIDICue & q_path )
00771 {
00772 bool e;
00773 e=false;
00774 return e;
00775 }
00776
00777
00778 }