Browse Source

cmDspPgm.c, cmDspPgmKrTimeLineLite.c : minor changes to support current runtime.

master
kevin 3 years ago
parent
commit
d85c5340fb
2 changed files with 72 additions and 66 deletions
  1. 59
    58
      dsp/cmDspPgm.c
  2. 13
    8
      dsp/cmDspPgmKrTimeLineLite.c

+ 59
- 58
dsp/cmDspPgm.c View File

@@ -529,7 +529,7 @@ cmDspRC_t _cmDspSysPgm_Stereo_Fx( cmDspSysH_t h, void** userPtrPtr )
529 529
 //( { label:cmDspPgm_PlaySine file_desc:"Play a sine signal." kw:[spgm] }
530 530
 cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr )
531 531
 {
532
-  bool useBuiltInFl = false;
532
+  bool useBuiltInFl = true;
533 533
   double frqHz = 440.0;
534 534
 
535 535
   cmDspInst_t* chp = cmDspSysAllocInst( h,"Scalar", "Channel",  5, kNumberDuiId, 0.0,  100.0, 1.0,  0.0);
@@ -3273,63 +3273,64 @@ cmDspRC_t _cmDspSysPgm_BinEnc( cmDspSysH_t h, void** userPtrPtr )
3273 3273
 //(
3274 3274
 _cmDspSysPgm_t _cmDspSysPgmArray[] = 
3275 3275
 {
3276
-  { "reflect",       _cmDspSysPgm_ReflectCalc,  NULL, NULL },
3277
-  { "tksblite",      _cmDspSysPgm_TksbLite,     NULL, NULL }, 
3278
-  { "tksb",          _cmDspSysPgm_Tksb,         NULL, NULL },
3279
-  { "time_line",     _cmDspSysPgm_TimeLine,     NULL, NULL },
3280
-  { "time_line_lite",_cmDspSysPgm_TimeLineLite, NULL, NULL },  
3281
-  { "seq-bldr",      _cmDspSysPgm_TakeSeqBldr,  NULL, NULL },
3282
-  { "multi-out",     _cmDspSysPgm_MultiOut,     NULL, NULL },
3283
-  { "multi-in",      _cmDspSysPgm_MultiIn,     NULL, NULL },
3284
-  { "goertzel",      _cmDspSysPgm_Goertzel,     NULL, NULL },
3285
-  { "main",          _cmDspSysPgm_Main,         NULL, NULL },
3286
-  { "array",         _cmDspSysPgm_Array,        NULL, NULL },
3287
-  { "line",          _cmDspSysPgm_Line,         NULL, NULL },
3288
-  { "1Up",           _cmDspSysPgm_1Up,          NULL, NULL },
3289
-  { "PortToSym",     _cmDspSysPgm_PortToSym,    NULL, NULL },
3290
-  { "preset",        _cmDspSysPgm_Preset,       NULL, NULL },
3291
-  { "rsrcWr",        _cmDspSysPgm_RsrcWr,       NULL, NULL },
3292
-  { "router",        _cmDspSysPgm_Router,       NULL, NULL },
3293
-  { "1ofN",          _cmDspSysPgm_1ofN,         NULL, NULL },
3294
-  { "NofM",          _cmDspSysPgm_NofM,         NULL, NULL },
3295
-  { "whirl_net",     _cmDspSysPgm_WhirlNet,     NULL, NULL },
3296
-  { "thunk_net",     _cmDspSysPgm_ThunkNet,     NULL, NULL },
3297
-  { "seq",           _cmDspSysPgm_Seq,          NULL, NULL },
3298
-  { "dist_ds",       _cmDspSysPgm_DistDs,       NULL, NULL },
3299
-  { "bi_quad_eq",    _cmDspSysPgm_BiQuadEq,     NULL, NULL },
3300
-  { "compressor",    _cmDspSysPgm_Compressor,   NULL, NULL },
3301
-  { "adsr",          _cmDspSysPgm_Adsr,         NULL, NULL },
3302
-  { "msg delay",     _cmDspSysPgm_MsgDelay,     NULL, NULL },
3303
-  { "pickup rmod2",  _cmDspSysPgm_RingMod2,     NULL, NULL },
3304
-  { "pickup rmod",  _cmDspSysPgm_RingMod,       NULL, NULL },
3305
-  { "pickup tails", _cmDspSysPgm_NoiseTails,    NULL, NULL },
3306
-  { "tails_2",      _cmDspSysPgm_NoiseTails2,   NULL, NULL },
3307
-  { "pickups",     _cmDspSysPgm_Pickups0,       NULL, NULL },
3308
-  { "sync_recd",   _cmDspSysPgm_SyncRecd,       NULL, NULL },
3309
-  { "midi_test",   _cmDspSysPgm_Test_Midi,      NULL, NULL },
3310
-  { "pedal_test",  _cmDspSysPgm_Test_Pedals,    NULL, NULL },
3311
-  { "midi_file",   _cmDspSysPgm_MidiFilePlay,   NULL, NULL },
3312
-  { "2_thru",      _cmDspSysPgm_Stereo_Through, NULL, NULL },
3313
-  { "all_in_out",  _cmDspSysPgm_All_In_And_Out, NULL, NULL },
3314
-  { "guitar",      _cmDspSysPgmGuitar,          NULL, NULL },
3315
-  { "2_fx",        _cmDspSysPgm_Stereo_Fx,      NULL, NULL },
3316
-  { "sine",        _cmDspSysPgm_PlaySine,       NULL, NULL },
3317
-  { "file",        _cmDspSysPgm_PlayFile,       NULL, NULL },
3318
-  { "gate_detect", _cmDspSysPgm_GateDetect,     NULL, NULL },
3319
-  { "rt_record",   _cmDspSysPgm_RtRecord,       NULL, NULL },
3320
-  { "record",      _cmDspSysPgm_Record,         NULL, NULL },
3321
-  { "pitch_shift", _cmDspSysPgm_PitchShiftFile, NULL, NULL },
3322
-  { "loop_recd",   _cmDspSysPgm_LoopRecd,       NULL, NULL },
3323
-  { "ui_test",     _cmDspSysPgm_UiTest,         NULL, NULL },
3324
-  { "xfade_test",  _cmDspSysPgm_Xfade,          NULL, NULL },
3325
-  { "auto_gain",   _cmDspSysPgm_AutoGain,       NULL, NULL },
3326
-  { "comb filt",   _cmDspSysPgm_CombFilt,       NULL, NULL },
3327
-  { "scalar op",   _cmDspSysPgm_ScalarOp,       NULL, NULL },
3328
-  { "seg_line",    _cmDspSysPgm_SegLine,        NULL, NULL },
3329
-  { "avail_ch",    _cmDspSysPgm_AvailCh,        NULL, NULL },
3330
-  { "two-d",         _cmDspSysPgm_TwoD,         NULL, NULL },
3331
-  { "bin-enc",       _cmDspSysPgm_BinEnc,       NULL, NULL },
3332
-  { NULL , NULL, NULL, NULL }
3276
+  { "reflect",           _cmDspSysPgm_ReflectCalc,    NULL, NULL },
3277
+  { "tksblite",          _cmDspSysPgm_TksbLite,       NULL, NULL }, 
3278
+  { "tksb",              _cmDspSysPgm_Tksb,           NULL, NULL },
3279
+  { "time_line",         _cmDspSysPgm_TimeLine,       NULL, NULL },
3280
+  { "time_line_lite",    _cmDspSysPgm_TimeLineLite,   NULL, NULL },
3281
+  { "time_line_lite_af", _cmDspSysPgm_TimeLineLiteAf, NULL, NULL },
3282
+  { "seq-bldr",          _cmDspSysPgm_TakeSeqBldr,    NULL, NULL },
3283
+  { "multi-out",         _cmDspSysPgm_MultiOut,       NULL, NULL },
3284
+  { "multi-in",          _cmDspSysPgm_MultiIn,        NULL, NULL },
3285
+  { "goertzel",          _cmDspSysPgm_Goertzel,       NULL, NULL },
3286
+  { "main",              _cmDspSysPgm_Main,           NULL, NULL },
3287
+  { "array",             _cmDspSysPgm_Array,          NULL, NULL },
3288
+  { "line",              _cmDspSysPgm_Line,           NULL, NULL },
3289
+  { "1Up",               _cmDspSysPgm_1Up,            NULL, NULL },
3290
+  { "PortToSym",         _cmDspSysPgm_PortToSym,      NULL, NULL },
3291
+  { "preset",            _cmDspSysPgm_Preset,         NULL, NULL },
3292
+  { "rsrcWr",            _cmDspSysPgm_RsrcWr,         NULL, NULL },
3293
+  { "router",            _cmDspSysPgm_Router,         NULL, NULL },
3294
+  { "1ofN",              _cmDspSysPgm_1ofN,           NULL, NULL },
3295
+  { "NofM",              _cmDspSysPgm_NofM,           NULL, NULL },
3296
+  { "whirl_net",         _cmDspSysPgm_WhirlNet,       NULL, NULL },
3297
+  { "thunk_net",         _cmDspSysPgm_ThunkNet,       NULL, NULL },
3298
+  { "seq",               _cmDspSysPgm_Seq,            NULL, NULL },
3299
+  { "dist_ds",           _cmDspSysPgm_DistDs,         NULL, NULL },
3300
+  { "bi_quad_eq",        _cmDspSysPgm_BiQuadEq,       NULL, NULL },
3301
+  { "compressor",        _cmDspSysPgm_Compressor,     NULL, NULL },
3302
+  { "adsr",              _cmDspSysPgm_Adsr,           NULL, NULL },
3303
+  { "msg delay",         _cmDspSysPgm_MsgDelay,       NULL, NULL },
3304
+  { "pickup rmod2",      _cmDspSysPgm_RingMod2,       NULL, NULL },
3305
+  { "pickup rmod",       _cmDspSysPgm_RingMod,        NULL, NULL },
3306
+  { "pickup tails",      _cmDspSysPgm_NoiseTails,     NULL, NULL },
3307
+  { "tails_2",           _cmDspSysPgm_NoiseTails2,    NULL, NULL },
3308
+  { "pickups",           _cmDspSysPgm_Pickups0,       NULL, NULL },
3309
+  { "sync_recd",         _cmDspSysPgm_SyncRecd,       NULL, NULL },
3310
+  { "midi_test",         _cmDspSysPgm_Test_Midi,      NULL, NULL },
3311
+  { "pedal_test",        _cmDspSysPgm_Test_Pedals,    NULL, NULL },
3312
+  { "midi_file",         _cmDspSysPgm_MidiFilePlay,   NULL, NULL },
3313
+  { "2_thru",            _cmDspSysPgm_Stereo_Through, NULL, NULL },
3314
+  { "all_in_out",        _cmDspSysPgm_All_In_And_Out, NULL, NULL },
3315
+  { "guitar",            _cmDspSysPgmGuitar,          NULL, NULL },
3316
+  { "2_fx",              _cmDspSysPgm_Stereo_Fx,      NULL, NULL },
3317
+  { "sine",              _cmDspSysPgm_PlaySine,       NULL, NULL },
3318
+  { "file",              _cmDspSysPgm_PlayFile,       NULL, NULL },
3319
+  { "gate_detect",       _cmDspSysPgm_GateDetect,     NULL, NULL },
3320
+  { "rt_record",         _cmDspSysPgm_RtRecord,       NULL, NULL },
3321
+  { "record",            _cmDspSysPgm_Record,         NULL, NULL },
3322
+  { "pitch_shift",       _cmDspSysPgm_PitchShiftFile, NULL, NULL },
3323
+  { "loop_recd",         _cmDspSysPgm_LoopRecd,       NULL, NULL },
3324
+  { "ui_test",           _cmDspSysPgm_UiTest,         NULL, NULL },
3325
+  { "xfade_test",        _cmDspSysPgm_Xfade,          NULL, NULL },
3326
+  { "auto_gain",         _cmDspSysPgm_AutoGain,       NULL, NULL },
3327
+  { "comb filt",         _cmDspSysPgm_CombFilt,       NULL, NULL },
3328
+  { "scalar op",         _cmDspSysPgm_ScalarOp,       NULL, NULL },
3329
+  { "seg_line",          _cmDspSysPgm_SegLine,        NULL, NULL },
3330
+  { "avail_ch",          _cmDspSysPgm_AvailCh,        NULL, NULL },
3331
+  { "two-d",             _cmDspSysPgm_TwoD,           NULL, NULL },
3332
+  { "bin-enc",           _cmDspSysPgm_BinEnc,         NULL, NULL },
3333
+  { NULL ,                                            NULL, NULL, NULL }
3333 3334
 };
3334 3335
 
3335 3336
 _cmDspSysPgm_t* _cmDspSysPgmArrayBase()

+ 13
- 8
dsp/cmDspPgmKrTimeLineLite.c View File

@@ -59,8 +59,11 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
59 59
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
60 60
     return rc;
61 61
 
62
-  cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 2);
63
-  cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, 3);
62
+  int baseAudioInCh =  0; // 2;
63
+  int baseAudioOutCh = 0;//  2;
64
+
65
+  cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, baseAudioInCh + 0);
66
+  cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn",     NULL,  1, baseAudioInCh + 1);
64 67
   //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn",      NULL,  2, "MOTU - Traveler mk3", "MIDI Port");
65 68
   //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn",      NULL,  2, "Apple Inc. - IAC Driver", "Bus 1");
66 69
   
@@ -71,8 +74,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
71 74
   cmDspInst_t* mfp  = cmDspSysAllocInst(h,"MidiFilePlay",NULL,  0 );
72 75
   cmDspInst_t* nmp  = cmDspSysAllocInst(h,"NanoMap",     NULL,  0 );
73 76
   cmDspInst_t* pic  = cmDspSysAllocInst(h,"Picadae",     NULL,  0 );
74
-  cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "Scarlett 18i20 USB","Scarlett 18i20 USB MIDI 1");
75
-  cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "picadae","picadae MIDI 1");
77
+  //cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "Scarlett 18i20 USB","Scarlett 18i20 USB MIDI 1");
78
+  cmDspInst_t* mop  = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "Fastlane","Fastlane MIDI A" );
79
+  //cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "picadae","picadae MIDI 1");
80
+  cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut",     NULL,  2, "Fastlane","Fastlane MIDI B");
76 81
   cmDspInst_t* sfp  = cmDspSysAllocInst(h,"ScFol",       NULL,  5, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
77 82
   cmDspInst_t* amp  = cmDspSysAllocInst(h,"ActiveMeas",  NULL,  1, 100 );
78 83
   cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod",       NULL,  2, r.modFn, "m1" );
@@ -89,10 +94,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
89 94
   _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, amp, modp, 1, 1 );
90 95
 
91 96
 
92
-  cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 4 ); // 4 Piano     1 Output
93
-  cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 5 ); // 5          2
94
-  cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 2 ); // 2 Transform 1 OUtput
95
-  cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, 3 ); // 3          2
97
+  cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, baseAudioOutCh+2 ); // 4 Piano     1 Output
98
+  cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, baseAudioOutCh+3 ); // 5          2
99
+  cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, baseAudioOutCh+0 ); // 2 Transform 1 OUtput
100
+  cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut",    NULL,   1, baseAudioOutCh+1 ); // 3          2
96 101
 
97 102
   cmDspSysNewPage(h,"Main");
98 103
   cmDspInst_t* notesOffb= cmDspSysAllocInst(h,"Button", "notesOff",   2, kButtonDuiId, 1.0 );

Loading…
Cancel
Save