Commit 26e7d756 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig

New upstream version 1.01.0

parents
csound6~.pd_linux
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(Csound)
find_path(PD_HEADER_PATH m_pd.h)
find_library(PD_LIBRARY pd.dll)
if(PD_HEADER_PATH)
if(APPLE)
set(pdname "csound6~.pd_darwin")
elseif(WIN32)
set(pdname "csound6~.dll")
else()
set(pdname "csound6~.pd_linux")
endif()
add_library(pdcsound MODULE src/csoundapi_tilde.c)
target_include_directories(pdcsound PRIVATE
${CSOUND_INCLUDE_DIRS} ${PD_HEADER_PATH})
if(WIN32)
target_link_libraries (pdcsound ${CSOUND_LIBRARY} ${PD_LIBRARY})
set_target_properties(pdcsound PROPERTIES "LINK_FLAGS"
"-Wl,--allow-multiple-definition")
else()
target_link_libraries (pdcsound ${CSOUND_LIBRARY})
endif()
set_target_properties(pdcsound PROPERTIES PREFIX "")
set_target_properties(pdcsound PROPERTIES SUFFIX "")
set_target_properties(pdcsound PROPERTIES OUTPUT_NAME ${pdname})
if(APPLE)
set_target_properties(pdcsound PROPERTIES "LINK_FLAGS"
"-flat_namespace -undefined suppress")
endif(APPLE)
install(TARGETS pdcsound
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
else()
MESSAGE(FATAL_ERROR "PD header not found")
endif()
Csound for Pure Data
===============
Build Instructions
----------------
The build requires Csound to be installed, as well as CMake. With this
in place, you can do:
```
$ mkdir build
$ cd build
$ cmake ..
$ make
```
# Try to find the Csound library.
# Once done this will define:
# CSOUND_FOUND - System has the Csound library
# CSOUND_INCLUDE_DIRS - The Csound include directories.
# CSOUND_LIBRARIES - The libraries needed to use the Csound library.
if(APPLE)
find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib64.framework/Headers
"$ENV{HOME}/Library/Frameworks/CsoundLib64.framework/Headers")
else()
find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound)
endif()
if(APPLE)
find_library(CSOUND_LIBRARY NAMES CsoundLib64 HINTS /Library/Frameworks/CsoundLib64.framework/
"$ENV{HOME}/Library/Frameworks/CsoundLib64.framework")
else()
find_library(CSOUND_LIBRARY NAMES csound64 csound)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CSOUND_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(CSOUND
CSOUND_LIBRARY CSOUND_INCLUDE_DIR)
mark_as_advanced(CSOUND_INCLUDE_DIR CSOUND_LIBRARY)
set(CSOUND_INCLUDE_DIRS ${CSOUND_INCLUDE_DIR})
set(CSOUND_LIBRARIES ${CSOUND_LIBRARY} )
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
nchnls = 2
0dbfs = 1
ksmps = 8
instr 1
kFreq invalue "freq"
kAmp invalue "amp"
kAmp port kAmp, .01
aSin poscil kAmp, kFreq
out aSin, aSin
endin
</CsInstruments>
<CsScore>
i 1 0 999
</CsScore>
</CsoundSynthesizer>
#N canvas 553 339 450 300 10;
#X msg 134 159 control amp \$1;
#X floatatom 281 133 5 0 0 0 - - -, f 5;
#X msg 256 160 control freq \$1;
#X obj 103 241 dac~;
#X msg 24 132 set amp freq;
#X obj 102 194 csound6~ control.csd;
#X obj 137 105 hsl 128 15 40 100 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 5300 1;
#X msg 284 105 400;
#X obj 284 78 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 22 10 1 set invalue channels by clicking on the set ... message
box;
#X text 24 44 2 click on the bang to activate the freq \, and move
the slider to change the amplitude;
#X obj 133 132 dbtorms;
#X connect 0 0 5 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X connect 5 1 3 1;
#X connect 6 0 11 0;
#X connect 7 0 1 0;
#X connect 8 0 7 0;
#X connect 11 0 0 0;
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
nchnls = 2
0dbfs = 1
ksmps = 8
instr 1
ktim times
kphas phasor 1
outvalue "time", ktim
outvalue "phas", kphas*127
endin
</CsInstruments>
<CsScore>
i 1 0 30
</CsScore>
</CsoundSynthesizer>
#N canvas 540 283 570 366 10;
#X obj 63 60 dac~;
#X msg 176 51 \; \$1 \$2;
#X obj 122 108 r time;
#X obj 184 108 r phas;
#X floatatom 122 135 5 0 0 0 - - -, f 5;
#X text 248 52 \$1 = channel;
#X obj 122 108 r time;
#X text 249 69 \$2 = value;
#X obj 185 132 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 61 26 csound6~ controlout.csd;
#X text 18 278 see http://write.flossmanuals.net/csound/a-csound-in-pd/
for more information;
#X connect 2 0 4 0;
#X connect 3 0 8 0;
#X connect 9 0 0 0;
#X connect 9 1 0 1;
#X connect 9 2 1 0;
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr= 44100
kr = 4410
ksmps = 10
nchnls= 4
instr 1
kfreq chnget "freq"
kamp chnget"amp"
a0 = 0
asyn oscili p4*kamp, p5*kfreq, 1
outq asyn*0.7, asyn*0.3,a0,a0
S1 chnget "blar"
printf "blar: %s, amp: %f freq: %f \n", kamp, S1, kamp, kfreq*p5
endin
instr 2
as1,as2,as3,as4 inq
krvt invalue "rev"
klt invalue "del"
kfm invalue "modf"
kmod phasor kfm
adel upsamp klt
a0 = 0
acmb flanger as4, adel, krvt
outvalue "mod", kmod
outq a0,a0,as4*0.1, acmb*0.1
endin
</CsInstruments>
<CsScore>
f0 450000
f1 0 4096 10 1
i2 0 450000
</CsScore>
</CsoundSynthesizer>
This diff is collapsed.
instr 1
k1 chnget "amp"
k2 chnget "freq"
a1 vco2 p4*port(k1,0.01), p5*port(k2,0.02)
out a1
endin
\ No newline at end of file
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 8
nchnls = 2
0dbfs = 1
seed 0; each time different seed
giSine ftgen 1, 0, 2^10, 10, 1; function table 1
instr 1
iDur random 0.5, 3
p3 = iDur
iFreq1 random 400, 1200
iFreq2 random 400, 1200
idB random -18, -6
kFreq linseg iFreq1, iDur, iFreq2
kEnv transeg ampdb(idB), p3, -10, 0
aTone oscili kEnv, kFreq, 1
outs aTone, aTone
endin
</CsInstruments>
<CsScore>
f 0 36000; play for 10 hours
e
</CsScore>
</CsoundSynthesizer>
#N canvas 476 258 457 359 10;
#X obj 103 286 dac~;
#X msg 71 32 event i 1 0 1;
#X text 186 32 call instrument 1;
#X text 89 77 choose different function tables for the sound;
#X text 20 -12 comment;
#X msg 71 110 event f 1 0 1024 10 1;
#X text 25 108 Sine;
#X text 25 134 Saw;
#X msg 71 134 event f 1 0 1024 10 1 0.5 0.33 0.25 0.2 0.167 0.143;
#X text 14 160 Square;
#X msg 72 160 event f 1 0 1024 10 1 0 0.33 0 0.2 0 0.143;
#X text 1 186 Triangle;
#X msg 72 184 event f 1 0 1024 10 1 0 -0.111 0 0.04 0 -0.02 0 0.0123
;
#X text 5 210 Impulse;
#X msg 72 209 event f 1 0 1024 10 1 1 1 1 1 1 1 1 1;
#X obj 101 252 csound6~ event.csd;
#X connect 1 0 15 0;
#X connect 5 0 15 0;
#X connect 8 0 15 0;
#X connect 10 0 15 0;
#X connect 12 0 15 0;
#X connect 14 0 15 0;
#X connect 15 0 0 0;
#X connect 15 1 0 1;
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
0dbfs = 1
ksmps = 8
nchnls = 2
instr 1
aL inch 1
aR inch 2
kcfL randomi 100, 1000, 1; center frequency
kcfR randomi 100, 1000, 1; for band pass filter
aFiltL butterbp aL, kcfL, kcfL/10
aoutL balance aFiltL, aL
aFiltR butterbp aR, kcfR, kcfR/10
aoutR balance aFiltR, aR
outch 1, aoutL
outch 2, aoutR
endin
</CsInstruments>
<CsScore>
i 1 0 10000
</CsScore>
</CsoundSynthesizer>
#N canvas 558 321 450 300 10;
#X obj 144 202 dac~;
#X obj 150 101 adc~;
#X text 133 65 Be careful with feedback!;
#X obj 143 146 csound6~ live.csd;
#X connect 1 0 3 0;
#X connect 1 1 3 1;
#X connect 3 0 0 0;
#X connect 3 1 0 1;
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
0dbfs = 1
ksmps = 8
nchnls = 2
instr 1
aL inch 1
aR inch 2
asinL oscils .1, 300, 0
asinR oscils .1, 400, 0
outch 1, aL+asinL
outch 2, aR+asinR
kout phasor .1
outvalue "testsig", kout
endin
</CsInstruments>
<CsScore>
i 1 0 10000
</CsScore>
</CsoundSynthesizer>
#N canvas 598 284 450 300 10;
#X obj 173 212 dac~;
#X obj 140 40 adc~;
#X msg 229 60 reset;
#X msg 298 69 run 0;
#X msg 297 37 run 1;
#X msg 250 165 \; \$1 \$2;
#X floatatom 252 233 5 0 0 0 - - -, f 5;
#X obj 252 209 r testsig;
#X obj 154 130 csound6~ livein.csd;
#X text 10 257 see http://write.flossmanuals.net/csound/a-csound-in-pd/
for more information;
#X connect 1 0 8 0;
#X connect 1 1 8 1;
#X connect 2 0 8 0;
#X connect 3 0 8 0;
#X connect 4 0 8 0;
#X connect 7 0 6 0;
#X connect 8 0 0 0;
#X connect 8 1 0 1;
#X connect 8 2 5 0;
<CsOptions>
-+rtmidi=null -M0
</CsOptions>
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
ksmps = 8
nchnls = 2
0dbfs = 1
giSine ftgen 0, 0, 2^10, 10, 1
instr 1
iFreq cpsmidi ;gets frequency of a pressed key
iAmp ampmidi 8;gets amplitude and scales 0-8
iRatio random .9, 1.1; ratio randomly between 0.9 and 1.1
aTone foscili .1, iFreq, 1, iRatio/5, iAmp+1, giSine; fm
aEnv linenr aTone, 0, .01, .01
outs aEnv, aEnv
endin
</CsInstruments>
<CsScore>
f 0 36000; play for 10 hours
e
</CsScore>
</CsoundSynthesizer>
#N canvas 525 271 450 300 10;
#X obj 103 248 dac~;
#X obj 61 88 notein;
#X obj 60 117 pack;
#X msg 59 145 midi 144 \$1 \$2;
#X text 124 88 receive note-on messages;
#X text 124 117 pack note number and velocity;
#X text 174 144 send to csound (144 = note on messages);
#X text 21 29 YOU MUST USE THE OPTION -+rtmidi=null -M0 IN YOUR CSD
FILE!;
#X obj 101 214 csound6~ midi.csd;
#X connect 1 0 2 0;
#X connect 1 1 2 1;
#X connect 2 0 3 0;
#X connect 3 0 8 0;
#X connect 8 0 0 0;
#X connect 8 1 0 1;
#N canvas 661 202 562 482 10;
#X msg 150 306 reset;
#X obj 93 92 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X msg 94 112 run \$1;
#X text 116 84 csound runs by default \, run 0 message stops it \,
run 1 re-starts it;
#X text 198 305 resets the engine and recompiles the score;
#X text 292 329 opens a new orc/score;
#X msg 37 216 rewind;
#X text 90 217 rewinds the score without recompilation;
#X msg 35 249 offset 20;
#X text 110 250 offsets the score playback by 20 secs;
#X msg 110 169 messages \$1;
#X obj 110 148 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X text 201 168 console messages on/off;
#X obj 85 383 csound6~;
#X msg 149 327 open cs6_demo.csd;
#X text 42 428 csound6~ is built with the number of audio output channels
taken from the orchestra \, or it can be built with a set number of
out/inlets (when its 1st argument is numeric), f 61;
#X text 27 16 Make sure that the Csound vector size given by the ksmps
value \, is not larger than the internal PD vector size. It should
be a power of 2 Start with ksmps=8. If there are performance problems
\, try to increase this value to 16 \, 32 \, or 64, f 65;
#X connect 0 0 13 0;
#X connect 1 0 2 0;
#X connect 2 0 13 0;
#X connect 6 0 13 0;
#X connect 8 0 13 0;
#X connect 10 0 13 0;
#X connect 11 0 10 0;
#X connect 14 0 13 0;
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 8
nchnls = 1
0dbfs = 1
giBeats ftgen 1, 0, -88200, 2, 0
giFox ftgen 2, 0, 0, 1, "fox.wav", 0, 0, 1
opcode BufPlay1, a, ikik
ifn, kspeed, iskip, kvol xin
kcps = kspeed / (ftlen(ifn) / sr)
iphs = iskip / (ftlen(ifn) / sr)
asig poscil3 kvol, kcps, ifn, iphs
xout asig
endop
instr 1
itable = p4
aout BufPlay1 itable, 1, 0, .5
out aout
endin
</CsInstruments>
<CsScore>
f 0 3600
</CsScore>
</CsoundSynthesizer>
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment