csound M4L devices made from Max help patches

Examples of editing Max help files to build Csound M4L devices

fof

A formant based Midi synth using Csound FOF – from the Max help file for [csound~]

from “The Csound Book” by Dr. Richard Boulanger

download

https://github.com/tkzic/max-for-live-projects

folder: csound

device: csound-fof3-tz.amxd

instructions

  • drag csound-fof3-tz.amxd file into a midi track
  • arm the track for recording and play some midi notes

svfilter

Sample playback using a state variable filter using Csound SVFILTER – from the Max help file for [csound~]

from “The Csound Book” by Dr. Richard Boulanger

download

https://github.com/tkzic/max-for-live-projects

folder: csound

device: svfilter-tz.amxd

instructions

  • drag svfilter-tz.amxd file into a midi track
  • drag a file into the waveform display (or use the default file)
  • With the mouse, select a section of the waveform to start playback

general suggestions

for converting Max help files to M4L devices:

  • Replace UI objects with Live versions. For example, toggle becomes live.toggle
  • Replace audio inputs/outputs with plugin~/plugout~
  • Select UI objects for presentation mode
  • In inspector, change default Scripting names for UI objects to allow automation

Csound in Pure Data on Raspberry-Pi

Today I got Csound running inside Pure Data (using the [csoundapi~] object) on Raspberry-Pi.

These instructions assume you have already installed pd-extended on R-Pi. See this post to learn how. https://reactivemusic.net/?p=4930

Install Csound

# sudo apt-get install cloud

Install csoundapi~

# sudo apt-get install pd-csound

Copy csoundapi~ library into the pd-extended extras folder

# cd /usr/lib/pd/csound/extras
# sudo cp csoundapi~.pd_linux ../../pd-extended/extra

Here’s a test patch:

Here’s the Csound source file (should be in the same folder as the test patch)

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
;Example by Joachim Heintz

sr = 44100
nchnls = 2
0dbfs = 1
ksmps = 8

giSine    ftgen     0, 0, 2^10, 10, 1

instr 1
kFreq     invalue   "freq"
kAmp      invalue   "amp"
aSin      oscili    kAmp, kFreq, giSine
          outs      aSin, aSin
endin

</CsInstruments>
<CsScore>
i 1 0 10000
</CsScore>
</CsoundSynthesizer>

Here are the source files:

http://zerokidz.com/rpi/csound/cstest2.pd

http://zerokidz.com/rpi/csound/control.csd

Here’s the command line to run the test:

# pd-extended -nogui -noadc cstest2.pd

Here are general instructions on running csound in Pure Data from Victor Lazzarini:

http://booki.flossmanuals.net/csound/_draft/_v/1.0/csound-in-pd/

 

csoundapi~ in Pd

notes

A preliminary test before trying this in Raspberry-Pi, I used the general instructions for csound in pd from Victor Lazzarini found here:

http://booki.flossmanuals.net/csound/_draft/_v/1.0/csound-in-pd/

to get csound running in pd-extended in Mac OS.

Looks pretty straightforward – biggest question will be compiling the external if it doesn’t install via package manager.

local test files are in tkzic/rpi/pd/csound

Here’s something from Victor Lazzarini which shows csound running on R-Pi

http://csound.1045644.n5.nabble.com/csound-on-raspberry-pi-td5718623.html

Here is installation instructions from Richard Dobson

http://csound.1045644.n5.nabble.com/Raspberry-Pi-w-Csound-td5717410.html