History

mega docstrings update: added class and func descriptors many things

nshaheed committed 3 years ago

Commit 273de491 parent 683264415 files · +254 −12Browse files

Showing the changes to Spectacle/Spectacle.cpp (1 of 15 files). Show all

Unified · Split

Spectacle/Spectacle.cpp+29−1
@@ -502,6 +502,8 @@ CK_DLL_QUERY( Spectacle ) · 501 unmodified lines
502502 QUERY->add_ctor(QUERY, spectacle_ctor);
503503 // register the destructor (probably no need to change)
504504 QUERY->add_dtor(QUERY, spectacle_dtor);
505+
506+ QUERY->doc_class(QUERY, "FFT-based spectral delay and EQ by John Gibson. Inspired by the totally awesome Spektral Delay plug-in by Native Instruments.");
505507
506508 // for UGen's only: add tick function
507509 QUERY->add_ugen_funcf(QUERY, spectacle_tick, NULL, 2, 2);
@@ -512,113 +514,139 @@ CK_DLL_QUERY( Spectacle ) · 4 unmodified lines
512514
513515 // example of adding setter method
514516 QUERY->add_mfun(QUERY, spectacle_clear, "void", "clear");
517+ QUERY->doc_func(QUERY, "Reset Spectacle.");
515518
516519 // example of adding setter method
517520 QUERY->add_mfun(QUERY, spectacle_setHold, "int", "hold");
518521 // example of adding argument to the above method
519522 QUERY->add_arg(QUERY, "int", "arg");
523+ QUERY->doc_func(QUERY, "Set hold. True to suppress input, false disables.");
520524
521525 // example of adding setter method
522526 QUERY->add_mfun(QUERY, spectacle_getHold, "int", "hold");
527+ QUERY->doc_func(QUERY, "Get hold. True to suppress input, false disables.");
523528
524529 // example of adding setter method
525530 QUERY->add_mfun(QUERY, spectacle_setPostEQ, "int", "posteq");
526531 // example of adding argument to the above method
527532 QUERY->add_arg(QUERY, "int", "arg");
533+ QUERY->doc_func(QUERY, "Set posteq to true to apply EQ after delay, rather than before.");
528534
529535 // example of adding setter method
530536 QUERY->add_mfun(QUERY, spectacle_getPostEQ, "int", "posteq");
537+ QUERY->doc_func(QUERY, "Get posteq. True applies EQ after delay, rather than before.");
531538
532539 // example of adding setter method
533540 QUERY->add_mfun(QUERY, spectacle_setFFTlen, "int", "fftlen");
534541 // example of adding argument to the above method
535542 QUERY->add_arg(QUERY, "int", "arg");
543+ QUERY->doc_func(QUERY, "Set FFT frame size (power of 2).");
536544
537545 // example of adding setter method
538546 QUERY->add_mfun(QUERY, spectacle_getFFTlen, "int", "fftlen");
547+ QUERY->doc_func(QUERY, "Get FFT frame size (power of 2).");
539548
540549 // example of adding setter method
541550 QUERY->add_mfun(QUERY, spectacle_setOverlap, "int", "overlap");
542551 // example of adding argument to the above method
543552 QUERY->add_arg(QUERY, "int", "arg");
553+ QUERY->doc_func(QUERY, "Set frame overlap; best between 2 and 6.");
544554
545555 // example of adding setter method
546556 QUERY->add_mfun(QUERY, spectacle_getOverlap, "int", "overlap");
557+ QUERY->doc_func(QUERY, "Get frame overlap; best between 2 and 6.");
547558
548559 // example of adding setter method
549560 QUERY->add_mfun(QUERY, spectacle_setMaxDelay, "dur", "delayMax");
550561 // example of adding argument to the above method
551562 QUERY->add_arg(QUERY, "dur", "delay");
563+ QUERY->doc_func(QUERY, "Set maximum delay time.");
552564
553565 // example of adding setter method
554566 QUERY->add_mfun(QUERY, spectacle_getMaxDelay, "dur", "delayMax");
567+ QUERY->doc_func(QUERY, "Get maximum delay time.");
555568
556569 // example of adding setter method
557570 QUERY->add_mfun(QUERY, spectacle_setMinDelay, "dur", "delayMin");
558571 // example of adding argument to the above method
559572 QUERY->add_arg(QUERY, "dur", "delay");
573+ QUERY->doc_func(QUERY, "Set minimum delay time.");
560574
561− // example of adding setter method
575+ // example of adding getter method
562576 QUERY->add_mfun(QUERY, spectacle_getMinDelay, "dur", "delayMin");
577+ QUERY->doc_func(QUERY, "Get minimum delay time.");
563578
564579 // example of adding setter method
565580 QUERY->add_mfun(QUERY, spectacle_setMinFreq, "float", "freqMin");
566581 // example of adding argument to the above method
567582 QUERY->add_arg(QUERY, "float", "arg");
583+ QUERY->doc_func(QUERY, "Set minimum frequency processed by Spectacle.");
568584
569585 // example of adding getter method
570586 QUERY->add_mfun(QUERY, spectacle_getMinFreq, "float", "freqMin");
587+ QUERY->doc_func(QUERY, "Get minimum frequency processed by Spectacle.");
571588
572589 // example of adding setter method
573590 QUERY->add_mfun(QUERY, spectacle_setMaxFreq, "float", "freqMax");
574591 // example of adding argument to the above method
575592 QUERY->add_arg(QUERY, "float", "arg");
593+ QUERY->doc_func(QUERY, "Set maximum frequency processed by Spectacle.");
576594
577595 // example of adding getter method
578596 QUERY->add_mfun(QUERY, spectacle_getMaxFreq, "float", "freqMax");
597+ QUERY->doc_func(QUERY, "Get maximum frequency processed by Spectacle.");
579598
580599 // example of adding setter method
581600 QUERY->add_mfun(QUERY, spectacle_setMix, "float", "mix");
582601 // example of adding argument to the above method
583602 QUERY->add_arg(QUERY, "float", "mix");
603+ QUERY->doc_func(QUERY, "Set mix of processed and unprocessed signal [0 - 1].");
584604
585605 // example of adding getter method
586606 QUERY->add_mfun(QUERY, spectacle_getMix, "float", "mix");
607+ QUERY->doc_func(QUERY, "Get mix of processed and unprocessed signal [0 - 1].");
587608
588609 // example of adding setter method
589610 QUERY->add_mfun(QUERY, spectacle_setFreqRange, "void", "range");
590611 // example of adding argument to the above method
591612 QUERY->add_arg(QUERY, "float", "arg1");
592613 QUERY->add_arg(QUERY, "float", "arg2");
614+ QUERY->doc_func(QUERY, "Set both min and max freqs in one command.");
593615
594616 // example of adding setter method
595617 QUERY->add_mfun(QUERY, spectacle_setTableLen, "int", "bands");
596618 // example of adding argument to the above method
597619 QUERY->add_arg(QUERY, "int", "arg");
620+ QUERY->doc_func(QUERY, "Set number of frequency bands, [1 - 512], default 64");
598621
599622 // example of adding setter method
600623 QUERY->add_mfun(QUERY, spectacle_getTableLen, "int", "bands");
624+ QUERY->doc_func(QUERY, "Get number of frequency bands, [1 - 512], default 64");
601625
602626 // example of adding setter method
603627 QUERY->add_mfun(QUERY, spectacle_setTable, "int", "table");
604628 // example of adding argument to the above method
605629 QUERY->add_arg(QUERY, "string", "table");
606630 QUERY->add_arg(QUERY, "string", "type");
631+ QUERY->doc_func(QUERY, "Set \"delay\", “eq”, or \"feedback\" tables to the types \"random\", \"ascending\", or \"descending.\" Example: table(\"delay\", \"random\");");
607632
608633 // example of adding setter method
609634 QUERY->add_mfun(QUERY, spectacle_setDelay, "dur", "delay");
610635 // example of adding argument to the above method
611636 QUERY->add_arg(QUERY, "dur", "delay");
637+ QUERY->doc_func(QUERY, "Set the same delay duration for all bands.");
612638
613639 // example of adding setter method
614640 QUERY->add_mfun(QUERY, spectacle_setEQ, "float", "eq");
615641 // example of adding argument to the above method
616642 QUERY->add_arg(QUERY, "float", "eq");
643+ QUERY->doc_func(QUERY, "Set the same EQ value for all bands (value is +/- dB).");
617644
618645 // example of adding setter method
619646 QUERY->add_mfun(QUERY, spectacle_setFB, "float", "feedback");
620647 // example of adding argument to the above method
621648 QUERY->add_arg(QUERY, "float", "feedback");
649+ QUERY->doc_func(QUERY, "Set the same feedback value for all bands [-1.0 - 1.0].");
622650
623651 // this reserves a variable in the ChucK internal class to store
624652 // referene to the c++ class we defined above

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t