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

This commit is contained in:
kevin 2020-07-17 12:11:26 -04:00
parent b79438c5f6
commit d85c5340fb
2 changed files with 72 additions and 66 deletions

View File

@ -529,7 +529,7 @@ cmDspRC_t _cmDspSysPgm_Stereo_Fx( cmDspSysH_t h, void** userPtrPtr )
//( { label:cmDspPgm_PlaySine file_desc:"Play a sine signal." kw:[spgm] } //( { label:cmDspPgm_PlaySine file_desc:"Play a sine signal." kw:[spgm] }
cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr ) cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr )
{ {
bool useBuiltInFl = false; bool useBuiltInFl = true;
double frqHz = 440.0; double frqHz = 440.0;
cmDspInst_t* chp = cmDspSysAllocInst( h,"Scalar", "Channel", 5, kNumberDuiId, 0.0, 100.0, 1.0, 0.0); 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 )
//( //(
_cmDspSysPgm_t _cmDspSysPgmArray[] = _cmDspSysPgm_t _cmDspSysPgmArray[] =
{ {
{ "reflect", _cmDspSysPgm_ReflectCalc, NULL, NULL }, { "reflect", _cmDspSysPgm_ReflectCalc, NULL, NULL },
{ "tksblite", _cmDspSysPgm_TksbLite, NULL, NULL }, { "tksblite", _cmDspSysPgm_TksbLite, NULL, NULL },
{ "tksb", _cmDspSysPgm_Tksb, NULL, NULL }, { "tksb", _cmDspSysPgm_Tksb, NULL, NULL },
{ "time_line", _cmDspSysPgm_TimeLine, NULL, NULL }, { "time_line", _cmDspSysPgm_TimeLine, NULL, NULL },
{ "time_line_lite",_cmDspSysPgm_TimeLineLite, NULL, NULL }, { "time_line_lite", _cmDspSysPgm_TimeLineLite, NULL, NULL },
{ "seq-bldr", _cmDspSysPgm_TakeSeqBldr, NULL, NULL }, { "time_line_lite_af", _cmDspSysPgm_TimeLineLiteAf, NULL, NULL },
{ "multi-out", _cmDspSysPgm_MultiOut, NULL, NULL }, { "seq-bldr", _cmDspSysPgm_TakeSeqBldr, NULL, NULL },
{ "multi-in", _cmDspSysPgm_MultiIn, NULL, NULL }, { "multi-out", _cmDspSysPgm_MultiOut, NULL, NULL },
{ "goertzel", _cmDspSysPgm_Goertzel, NULL, NULL }, { "multi-in", _cmDspSysPgm_MultiIn, NULL, NULL },
{ "main", _cmDspSysPgm_Main, NULL, NULL }, { "goertzel", _cmDspSysPgm_Goertzel, NULL, NULL },
{ "array", _cmDspSysPgm_Array, NULL, NULL }, { "main", _cmDspSysPgm_Main, NULL, NULL },
{ "line", _cmDspSysPgm_Line, NULL, NULL }, { "array", _cmDspSysPgm_Array, NULL, NULL },
{ "1Up", _cmDspSysPgm_1Up, NULL, NULL }, { "line", _cmDspSysPgm_Line, NULL, NULL },
{ "PortToSym", _cmDspSysPgm_PortToSym, NULL, NULL }, { "1Up", _cmDspSysPgm_1Up, NULL, NULL },
{ "preset", _cmDspSysPgm_Preset, NULL, NULL }, { "PortToSym", _cmDspSysPgm_PortToSym, NULL, NULL },
{ "rsrcWr", _cmDspSysPgm_RsrcWr, NULL, NULL }, { "preset", _cmDspSysPgm_Preset, NULL, NULL },
{ "router", _cmDspSysPgm_Router, NULL, NULL }, { "rsrcWr", _cmDspSysPgm_RsrcWr, NULL, NULL },
{ "1ofN", _cmDspSysPgm_1ofN, NULL, NULL }, { "router", _cmDspSysPgm_Router, NULL, NULL },
{ "NofM", _cmDspSysPgm_NofM, NULL, NULL }, { "1ofN", _cmDspSysPgm_1ofN, NULL, NULL },
{ "whirl_net", _cmDspSysPgm_WhirlNet, NULL, NULL }, { "NofM", _cmDspSysPgm_NofM, NULL, NULL },
{ "thunk_net", _cmDspSysPgm_ThunkNet, NULL, NULL }, { "whirl_net", _cmDspSysPgm_WhirlNet, NULL, NULL },
{ "seq", _cmDspSysPgm_Seq, NULL, NULL }, { "thunk_net", _cmDspSysPgm_ThunkNet, NULL, NULL },
{ "dist_ds", _cmDspSysPgm_DistDs, NULL, NULL }, { "seq", _cmDspSysPgm_Seq, NULL, NULL },
{ "bi_quad_eq", _cmDspSysPgm_BiQuadEq, NULL, NULL }, { "dist_ds", _cmDspSysPgm_DistDs, NULL, NULL },
{ "compressor", _cmDspSysPgm_Compressor, NULL, NULL }, { "bi_quad_eq", _cmDspSysPgm_BiQuadEq, NULL, NULL },
{ "adsr", _cmDspSysPgm_Adsr, NULL, NULL }, { "compressor", _cmDspSysPgm_Compressor, NULL, NULL },
{ "msg delay", _cmDspSysPgm_MsgDelay, NULL, NULL }, { "adsr", _cmDspSysPgm_Adsr, NULL, NULL },
{ "pickup rmod2", _cmDspSysPgm_RingMod2, NULL, NULL }, { "msg delay", _cmDspSysPgm_MsgDelay, NULL, NULL },
{ "pickup rmod", _cmDspSysPgm_RingMod, NULL, NULL }, { "pickup rmod2", _cmDspSysPgm_RingMod2, NULL, NULL },
{ "pickup tails", _cmDspSysPgm_NoiseTails, NULL, NULL }, { "pickup rmod", _cmDspSysPgm_RingMod, NULL, NULL },
{ "tails_2", _cmDspSysPgm_NoiseTails2, NULL, NULL }, { "pickup tails", _cmDspSysPgm_NoiseTails, NULL, NULL },
{ "pickups", _cmDspSysPgm_Pickups0, NULL, NULL }, { "tails_2", _cmDspSysPgm_NoiseTails2, NULL, NULL },
{ "sync_recd", _cmDspSysPgm_SyncRecd, NULL, NULL }, { "pickups", _cmDspSysPgm_Pickups0, NULL, NULL },
{ "midi_test", _cmDspSysPgm_Test_Midi, NULL, NULL }, { "sync_recd", _cmDspSysPgm_SyncRecd, NULL, NULL },
{ "pedal_test", _cmDspSysPgm_Test_Pedals, NULL, NULL }, { "midi_test", _cmDspSysPgm_Test_Midi, NULL, NULL },
{ "midi_file", _cmDspSysPgm_MidiFilePlay, NULL, NULL }, { "pedal_test", _cmDspSysPgm_Test_Pedals, NULL, NULL },
{ "2_thru", _cmDspSysPgm_Stereo_Through, NULL, NULL }, { "midi_file", _cmDspSysPgm_MidiFilePlay, NULL, NULL },
{ "all_in_out", _cmDspSysPgm_All_In_And_Out, NULL, NULL }, { "2_thru", _cmDspSysPgm_Stereo_Through, NULL, NULL },
{ "guitar", _cmDspSysPgmGuitar, NULL, NULL }, { "all_in_out", _cmDspSysPgm_All_In_And_Out, NULL, NULL },
{ "2_fx", _cmDspSysPgm_Stereo_Fx, NULL, NULL }, { "guitar", _cmDspSysPgmGuitar, NULL, NULL },
{ "sine", _cmDspSysPgm_PlaySine, NULL, NULL }, { "2_fx", _cmDspSysPgm_Stereo_Fx, NULL, NULL },
{ "file", _cmDspSysPgm_PlayFile, NULL, NULL }, { "sine", _cmDspSysPgm_PlaySine, NULL, NULL },
{ "gate_detect", _cmDspSysPgm_GateDetect, NULL, NULL }, { "file", _cmDspSysPgm_PlayFile, NULL, NULL },
{ "rt_record", _cmDspSysPgm_RtRecord, NULL, NULL }, { "gate_detect", _cmDspSysPgm_GateDetect, NULL, NULL },
{ "record", _cmDspSysPgm_Record, NULL, NULL }, { "rt_record", _cmDspSysPgm_RtRecord, NULL, NULL },
{ "pitch_shift", _cmDspSysPgm_PitchShiftFile, NULL, NULL }, { "record", _cmDspSysPgm_Record, NULL, NULL },
{ "loop_recd", _cmDspSysPgm_LoopRecd, NULL, NULL }, { "pitch_shift", _cmDspSysPgm_PitchShiftFile, NULL, NULL },
{ "ui_test", _cmDspSysPgm_UiTest, NULL, NULL }, { "loop_recd", _cmDspSysPgm_LoopRecd, NULL, NULL },
{ "xfade_test", _cmDspSysPgm_Xfade, NULL, NULL }, { "ui_test", _cmDspSysPgm_UiTest, NULL, NULL },
{ "auto_gain", _cmDspSysPgm_AutoGain, NULL, NULL }, { "xfade_test", _cmDspSysPgm_Xfade, NULL, NULL },
{ "comb filt", _cmDspSysPgm_CombFilt, NULL, NULL }, { "auto_gain", _cmDspSysPgm_AutoGain, NULL, NULL },
{ "scalar op", _cmDspSysPgm_ScalarOp, NULL, NULL }, { "comb filt", _cmDspSysPgm_CombFilt, NULL, NULL },
{ "seg_line", _cmDspSysPgm_SegLine, NULL, NULL }, { "scalar op", _cmDspSysPgm_ScalarOp, NULL, NULL },
{ "avail_ch", _cmDspSysPgm_AvailCh, NULL, NULL }, { "seg_line", _cmDspSysPgm_SegLine, NULL, NULL },
{ "two-d", _cmDspSysPgm_TwoD, NULL, NULL }, { "avail_ch", _cmDspSysPgm_AvailCh, NULL, NULL },
{ "bin-enc", _cmDspSysPgm_BinEnc, NULL, NULL }, { "two-d", _cmDspSysPgm_TwoD, NULL, NULL },
{ NULL , NULL, NULL, NULL } { "bin-enc", _cmDspSysPgm_BinEnc, NULL, NULL },
{ NULL , NULL, NULL, NULL }
}; };
_cmDspSysPgm_t* _cmDspSysPgmArrayBase() _cmDspSysPgm_t* _cmDspSysPgmArrayBase()

View File

@ -59,8 +59,11 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
if( krLoadRsrc(h,&err,&r) != kOkDspRC ) if( krLoadRsrc(h,&err,&r) != kOkDspRC )
return rc; return rc;
cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 2); int baseAudioInCh = 0; // 2;
cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn", NULL, 1, 3); int baseAudioOutCh = 0;// 2;
cmDspInst_t* ai0 = cmDspSysAllocInst(h,"AudioIn", NULL, 1, baseAudioInCh + 0);
cmDspInst_t* ai1 = cmDspSysAllocInst(h,"AudioIn", NULL, 1, baseAudioInCh + 1);
//cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 2, "MOTU - Traveler mk3", "MIDI Port"); //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 2, "MOTU - Traveler mk3", "MIDI Port");
//cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 2, "Apple Inc. - IAC Driver", "Bus 1"); //cmDspInst_t* mip = cmDspSysAllocInst(h,"MidiIn", NULL, 2, "Apple Inc. - IAC Driver", "Bus 1");
@ -71,8 +74,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
cmDspInst_t* mfp = cmDspSysAllocInst(h,"MidiFilePlay",NULL, 0 ); cmDspInst_t* mfp = cmDspSysAllocInst(h,"MidiFilePlay",NULL, 0 );
cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 ); cmDspInst_t* nmp = cmDspSysAllocInst(h,"NanoMap", NULL, 0 );
cmDspInst_t* pic = cmDspSysAllocInst(h,"Picadae", NULL, 0 ); cmDspInst_t* pic = cmDspSysAllocInst(h,"Picadae", NULL, 0 );
cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "Scarlett 18i20 USB","Scarlett 18i20 USB MIDI 1"); //cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "Scarlett 18i20 USB","Scarlett 18i20 USB MIDI 1");
cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "picadae","picadae MIDI 1"); cmDspInst_t* mop = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "Fastlane","Fastlane MIDI A" );
//cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "picadae","picadae MIDI 1");
cmDspInst_t* mo2p = cmDspSysAllocInst(h,"MidiOut", NULL, 2, "Fastlane","Fastlane MIDI B");
cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 5, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl ); cmDspInst_t* sfp = cmDspSysAllocInst(h,"ScFol", NULL, 5, r.scFn, sfBufCnt, sfMaxWndCnt, sfMinVel, sfEnaMeasFl );
cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 ); cmDspInst_t* amp = cmDspSysAllocInst(h,"ActiveMeas", NULL, 1, 100 );
cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" ); cmDspInst_t* modp = cmDspSysAllocInst(h,"ScMod", NULL, 2, r.modFn, "m1" );
@ -89,10 +94,10 @@ cmDspRC_t _cmDspSysPgm_TimeLineLite(cmDspSysH_t h, void** userPtrPtr )
_cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, amp, modp, 1, 1 ); _cmDspSys_TlXformChain(h, &c1, preGrpSymId, cmpPreGrpSymId, amp, modp, 1, 1 );
cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 4 ); // 4 Piano 1 Output cmDspInst_t* ao0 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, baseAudioOutCh+2 ); // 4 Piano 1 Output
cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 5 ); // 5 2 cmDspInst_t* ao1 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, baseAudioOutCh+3 ); // 5 2
cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 2 ); // 2 Transform 1 OUtput cmDspInst_t* ao2 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, baseAudioOutCh+0 ); // 2 Transform 1 OUtput
cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 3 ); // 3 2 cmDspInst_t* ao3 = cmDspSysAllocInst(h,"AudioOut", NULL, 1, baseAudioOutCh+1 ); // 3 2
cmDspSysNewPage(h,"Main"); cmDspSysNewPage(h,"Main");
cmDspInst_t* notesOffb= cmDspSysAllocInst(h,"Button", "notesOff", 2, kButtonDuiId, 1.0 ); cmDspInst_t* notesOffb= cmDspSysAllocInst(h,"Button", "notesOff", 2, kButtonDuiId, 1.0 );