|
|
|
|
369
|
|
369
|
|
370
|
cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr )
|
370
|
cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr )
|
371
|
{
|
371
|
{
|
372
|
- bool useBuiltInFl = false;
|
|
|
|
|
372
|
+ bool useBuiltInFl = true;
|
373
|
double frqHz = 440.0;
|
373
|
double frqHz = 440.0;
|
374
|
|
374
|
|
375
|
cmDspInst_t* chp = cmDspSysAllocInst( h,"Scalar", "Channel", 5, kNumberDuiId, 0.0, 100.0, 1.0, 0.0);
|
375
|
cmDspInst_t* chp = cmDspSysAllocInst( h,"Scalar", "Channel", 5, kNumberDuiId, 0.0, 100.0, 1.0, 0.0);
|
|
|
|
|
2690
|
double xfadeMs = 250.0;
|
2690
|
double xfadeMs = 250.0;
|
2691
|
bool xfadeInitFl = false;
|
2691
|
bool xfadeInitFl = false;
|
2692
|
|
2692
|
|
2693
|
- const char* fn = "/home/kevin/media/audio/20110723-Kriesberg/Audio Files/Piano 3_01.wav";
|
|
|
|
|
2693
|
+ const char* fn = "/Users/kevin/media/audio/20110723-Kriesberg/Audio Files/Piano 3_01.wav";
|
2694
|
|
2694
|
|
2695
|
cmDspInst_t* chk0 = cmDspSysAllocInst(h,"Button", "0", 2, kButtonDuiId, 0.0 );
|
2695
|
cmDspInst_t* chk0 = cmDspSysAllocInst(h,"Button", "0", 2, kButtonDuiId, 0.0 );
|
|
|
2696
|
+ cmDspInst_t* hz = cmDspSysAllocScalar( h, "hz",0.0, 10000.0, 0.01, 1.0 );
|
|
|
2697
|
+
|
2696
|
//cmDspInst_t* chk1 = cmDspSysAllocInst(h,"Button", "1", 2, kCheckDuiId, 0.0 );
|
2698
|
//cmDspInst_t* chk1 = cmDspSysAllocInst(h,"Button", "1", 2, kCheckDuiId, 0.0 );
|
2697
|
|
2699
|
|
2698
|
cmDspInst_t* achp = cmDspSysAllocInst( h, "AvailCh", NULL, 1, xfadeChCnt );
|
2700
|
cmDspInst_t* achp = cmDspSysAllocInst( h, "AvailCh", NULL, 1, xfadeChCnt );
|
|
|
|
|
2703
|
cmDspInst_t* fwtp = cmDspSysAllocInst( h, "WaveTable", NULL, 5, ((int)cmDspSysSampleRate(h)), 1, fn, -1, 7000000 );
|
2705
|
cmDspInst_t* fwtp = cmDspSysAllocInst( h, "WaveTable", NULL, 5, ((int)cmDspSysSampleRate(h)), 1, fn, -1, 7000000 );
|
2704
|
cmDspInst_t* fad0 = cmDspSysAllocInst( h, "Xfader", NULL, 3, xfadeChCnt, xfadeMs, xfadeInitFl );
|
2706
|
cmDspInst_t* fad0 = cmDspSysAllocInst( h, "Xfader", NULL, 3, xfadeChCnt, xfadeMs, xfadeInitFl );
|
2705
|
|
2707
|
|
2706
|
- //cmDspInst_t* prp = cmDspSysAllocInst( h, "Printer", NULL, 1, ">" );
|
|
|
|
|
2708
|
+ cmDspInst_t* prp = cmDspSysAllocInst( h, "Printer", NULL, 1, ">" );
|
2707
|
|
2709
|
|
2708
|
cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 0 );
|
2710
|
cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 0 );
|
2709
|
cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 1 );
|
2711
|
cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, 1 );
|
|
|
|
|
2722
|
//cmDspSysInstallCb(h, chk0, "out", fad0, "gate-0", NULL);
|
2724
|
//cmDspSysInstallCb(h, chk0, "out", fad0, "gate-0", NULL);
|
2723
|
//cmDspSysInstallCb(h, chk1, "out", fad0, "gate-1", NULL);
|
2725
|
//cmDspSysInstallCb(h, chk1, "out", fad0, "gate-1", NULL);
|
2724
|
|
2726
|
|
2725
|
- cmDspSysInstallCb(h, chk0, "sym", achp, "trig", NULL);
|
|
|
2726
|
- cmDspSysInstallCb(h, achp, "gate-0", fad0, "gate-0", NULL );
|
|
|
2727
|
- cmDspSysInstallCb(h, fad0, "state-0", achp, "dis-0", NULL );
|
|
|
|
|
2727
|
+ cmDspSysInstallCb(h, chk0, "sym", achp, "trig", NULL); // btn->availCh.trig
|
|
|
2728
|
+ cmDspSysInstallCb(h, achp, "ch", prp, "in", NULL); // availCh.ch -> printer
|
|
|
2729
|
+
|
|
|
2730
|
+
|
|
|
2731
|
+ cmDspSysInstallCb(h, achp, "gate-0", fad0, "gate-0", NULL ); // availCh.gate->xfad.gate
|
|
|
2732
|
+ cmDspSysInstallCb(h, fad0, "state-0", achp, "dis-0", NULL ); // xfad->state ->availCh.dis
|
2728
|
|
2733
|
|
2729
|
cmDspSysInstallCb(h, achp, "gate-1", fad0, "gate-1", NULL );
|
2734
|
cmDspSysInstallCb(h, achp, "gate-1", fad0, "gate-1", NULL );
|
2730
|
- cmDspSysInstallCb(h, fad0, "state-1", achp, "dis-1", NULL );
|
|
|
|
|
2735
|
+ cmDspSysInstallCb(h, fad0, "state-1", achp, "dis-1", NULL );
|
|
|
2736
|
+
|
|
|
2737
|
+ cmDspSysInstallCb(h, hz, "val", sphp, "mult", NULL );
|
2731
|
|
2738
|
|
2732
|
|
2739
|
|
2733
|
return kOkDspRC;
|
2740
|
return kOkDspRC;
|