MIDI triggered notes
This series of tutorials for Csound will explore the use of MIDI to control aspects of synthesis and processing within Csound. I've tried to use canonical opcodes, so they should be cross platform. Please let me know if you find one which isn't.
The tutorials assume basic knowledge of Csound, though I try to explain everything in detail so I hope even a beginner will understand the programs. If you are such a beginner, you might want to check out the tutorials in the CsoundAV Video Tutorials first. They describe csound variable types and syntax starting from absolute scratch. You will also find editor suggestions and how to download the program for Windows.
OK, here we go with the first tutorial for midi. It is a very simple instrument that just makes a sine wave sound with the appropriate pitch according to the midi note. You can copy-paste all the code (including the comments) into your editor and compile.
For MacCsound, you can paste the <CsInstruments> section into the orc tab, and the <CsScore> into the sco tab. You then choose realtime audio output on the upper right corner, and you should be set. Let me know if you have any problems.
You will need a MIDI controller keyboard which transmits on channel one, connected to your system.
<CsoundSynthesizer>
<CsOptions> -+P -+KThis very simple synthesizer introduces the use of MIDI in Csound. Please let me know how you do, especially if you're running on Linux or Mac.
Thanks to Matt Ingalls for showing me a better way to comment a tutorial, and to Art Hunkins for the linsegr suggestion.