-
Notifications
You must be signed in to change notification settings - Fork 29
General remarks on improvements of examples
-
examples should just work out of box.
-
all examples should work from the terminal on the 3 main platforms OSX, Windows and Linux
-
same header for all the examples
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
all of these could be guides for future examples, but we should be very careful if we change any existing examples. iirc some opcodes don't respect 0dbfs. There may be exceptions: some examples require sr = 96000 in case of aliasing. In that case i think it might be worth to add a comment why this sr is so high. AND we need to be careful changing examples historically. AND Perhaps we wrap the parts that need to be at that rate in a udo with setksmps=1
-
all the examples that use live input - that use the -adc flag, make source a mono one: for one mic
-
Example filenames:
If only one example file used:
-
opcodename.csd - the most basic display of the essence of the opcode. Why does this opcodes exist? Why is it different from other (similar) opcodes, who needs it?
If there are multiple examples:
-
opcodename.csd - the most basic display of the essence of the opcode. Why does this opcodes exist? Why is it different from other (similar) opcodes, who needs it?
-
opcodename-2.csd - another most basic display of the essence of the opcode. On the same level as opcodename.csd
-
opcodename-advanced.csd - in what kind of situation/environment is the opcode needed? What is its interaction with other code?
-
opcodename-musical.csd - a cool musical gesture
- a new musical-examples folder in the top tree
- link from the concerning opcodes to that folder
- no musical example is visible directly on the manual page
-
opcodes that are nearly identical but have (slightly) different applications
-
all the members of this group get the same group example as a secondary example, or at least NOT as the first example
-
user can make better decision on which opcode is best suited for his/her needs, based on the group example
-
candidates for the group example
outq1, outq2, outq3, outq4
ampdb, ampdbfs, db, dbamp, dbfsamp
in32, inh, etc
ceil, round, int, floor
--> doneadsr, xadsr, madsr, mxadsr
--> done
-
every “midi opcode” example could have 2 instruments: 1 with real time midi and 1 with a midi file. How to switch easily or how to manage midifile playing and 'playing along' with an active midi input port as well??
-
-odac -m0 --midi-key=4 --midi-velocity-amp=5 ; treat p4 and p5 as midi data
like mxadsr https://csound.com/manual/mxadsr.html
- FLTK is no longer available on the Mac. FLTK should get a label so we can identify them and replace the examples (menno): there are quite a few FLTK opcodes in the manual, we could at one point decide if they are deprecated or not and move them over to that section of the manual. Lengthier discussions about FLTK here: https://github.com/csound/manual/wiki/FLTK-no-longer-supported-by-all-platforms--how-to-deal-with-it%3F
Victor: widgets in FLTK seem OK on Linux but remain problematic in MacOS
These will never work on MacOS because of threading issues. We cannot use them on that system and there is no solution for it.
-
TCL/TK (button,checkbox etc.) is not a serious replacement as it is hardly available on the 3 platforms
-
send out a message to the forum on a regular basis, and to ask people to send in their reactions on existing, bad or missing examples or asking for musical examples
-
add a section of the manual that discusses the caveats of the frontends
-
new opcodes and manual pages have been added recently, these 2 examples both use the virtual keyboard and thus FLTK.