diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..df437db
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+# don't include repository configuration in the releases
+# as created by 'git archive'
+.git*      	export-ignore
+.travis.yml	export-ignore
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61cff97..3765aa7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,6 @@
 cmake_minimum_required(VERSION 2.8.12)
 set(CMAKE_MACOSX_RPATH 1)
+set(CMAKE_VERBOSE_MAKEFILE ON)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
 find_package(Csound)
@@ -11,6 +12,7 @@ if(PD_HEADER_PATH)
         set(pdname "csound6~.pd_darwin")
     elseif(WIN32)
       set(pdname "csound6~.dll")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32 -D__x86_64__")
     else()
        set(pdname "csound6~.pd_linux")
     endif()
@@ -18,7 +20,8 @@ if(PD_HEADER_PATH)
     target_include_directories(pdcsound PRIVATE
     ${CSOUND_INCLUDE_DIRS} ${PD_HEADER_PATH})
     if(WIN32)
-        target_link_libraries (pdcsound ${CSOUND_LIBRARY} ${PD_LIBRARY})
+        target_link_libraries (pdcsound ${CSOUND_LIBRARY}
+    ${PD_LIBRARY})
         set_target_properties(pdcsound  PROPERTIES "LINK_FLAGS"
             "-Wl,--allow-multiple-definition")
     else()
@@ -31,10 +34,8 @@ if(PD_HEADER_PATH)
         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")
+   MESSAGE(FATAL_ERROR "Pd header not found")
 endif()
     
 
diff --git a/debian/changelog b/debian/changelog
index 41256d7..0efdc0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pd-csound (2:1.01.0+git20181205.2563ac1-1) UNRELEASED; urgency=medium
+
+  * New upstream snapshot.
+  * Drop patch const_fixes.patch, present upstream.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 26 Sep 2019 22:21:01 +0000
+
 pd-csound (2:1.01.0-1) unstable; urgency=medium
 
   * Initial release. (Closes: #915553)
diff --git a/debian/patches/const_fixes.patch b/debian/patches/const_fixes.patch
deleted file mode 100644
index cf9a445..0000000
--- a/debian/patches/const_fixes.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: cast types to allow compilation
-Author: IOhannes m zmölnig
-Origin: Debian
-Bug: https://github.com/csound/csound_pd/issues/1
-Applied-Upstream: d956766e85db582842c43115b66651a16e0023f9
-Last-Update: 2018-12-04
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- pd-csound.orig/src/csoundapi_tilde.c
-+++ pd-csound/src/csoundapi_tilde.c
-@@ -735,7 +735,7 @@
-       if(i+1 < argc){
-         if(argv[i+1].a_type == A_SYMBOL) {
-           t_symbol *mess = atom_getsymbol(&argv[i+1]);
--          csoundSetStringChannel(csound, chn, mess->s_name);
-+          csoundSetStringChannel(csound, chn, (char*)mess->s_name);
-         }
-         else if (argv[i+1].a_type == A_FLOAT) {
-           csoundSetControlChannel(csound, chn, atom_getfloat(&argv[i+1]));
diff --git a/debian/patches/series b/debian/patches/series
index d1c0733..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-const_fixes.patch
diff --git a/examples/README_EXAMPLES.md b/examples/README_EXAMPLES.md
new file mode 100644
index 0000000..ac7bc8c
--- /dev/null
+++ b/examples/README_EXAMPLES.md
@@ -0,0 +1,8 @@
+Examples in Csound for Pure Data
+===============
+
+1. The files *csound6~-help.pd*, *cs6_demo.csd* and *cs6_demo.csd* are written by Victor Lazzarini.
+
+2. The folder *csound_floss_manual* contains the examples from chapter 09A CSOUND IN PD in the [Csound FLOSS Manual](http://write.flossmanuals.net/csound/a-csound-in-pd/).
+
+3. The folder "iem_workshop" contains the examples from Joachim Heintz for a workshop at IEM Graz in december 2018.
diff --git a/examples/demo.orc b/examples/cs6_demo.orc
similarity index 100%
rename from examples/demo.orc
rename to examples/cs6_demo.orc
diff --git a/examples/csound6~-help.pd b/examples/csound6~-help.pd
index cc88b53..6b9c342 100644
--- a/examples/csound6~-help.pd
+++ b/examples/csound6~-help.pd
@@ -1,29 +1,29 @@
-#N canvas 120 284 1101 736 10;
+#N canvas 120 289 1101 736 10;
 #X obj 421 643 dac~;
 #X msg 578 316 event e;
 #X obj 446 148 vsl 15 128 0.1 4 0 0 empty empty empty 0 -8 0 8 -257472
--1 -1 5700 1;
+-1 -1 0 1;
 #X obj 348 196 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -257472
--1 -1 4500 1;
+-1 -1 0 1;
 #X obj 252 196 vsl 15 128 0 0.99 0 0 empty empty empty 0 -8 0 8 -261681
--1 -1 6200 1;
+-1 -1 0 1;
 #X msg 252 337 control rev \$1;
 #X obj 157 198 vsl 15 128 0.1 0.5 0 0 empty empty empty 0 -8 0 8 -261681
--1 -1 6400 1;
+-1 -1 0 1;
 #X msg 157 337 control del \$1;
 #X msg 553 478 reset;
 #X msg 586 269 event i 1 0 10 16000 200;
 #X obj -12 6 loadbang;
-#X obj 258 39 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 258 39 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
 ;
 #X msg 259 59 run \$1;
 #X msg 567 362 event f 1 0 4096 10 1 0.5 0.25 0.2 0.166;
 #X obj 56 199 vsl 15 128 0.1 2 0 0 empty empty empty 0 -8 0 8 -261681
--1 -1 7900 1;
+-1 -1 0 1;
 #X msg 56 338 control modf \$1;
 #X obj 394 84 r mod;
 #X obj 397 273 *;
-#X obj 411 242 tgl 15 0 empty empty empty 0 -6 0 8 -257472 -1 -1 1
+#X obj 411 242 tgl 15 0 empty empty empty 0 -6 0 8 -257472 -1 -1 0
 1;
 #X obj 432 314 +;
 #X msg 500 639 \; \$1 \$2;
@@ -62,7 +62,7 @@ directory or should be given a full-path relative to the canvas directory
 #X obj 113 263 *~;
 #X obj 175 187 delay 500;
 #X msg 175 208 1 500;
-#X obj 106 122 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 106 122 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
 #X obj 113 291 outlet~;
 #X connect 0 0 4 0;
@@ -96,7 +96,6 @@ to be registered;
 #X text -13 622 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);
-#X msg -7 520 compile demo.orc;
 #X text -9 501 compiles new instruments from orchestra file;
 #X obj 392 611 csound6~ cs6_demo.csd;
 #X text -9 669 csound6~ 1 (c) V Lazzarini \, 2005-2013;
@@ -658,44 +657,45 @@ out/inlets (when its 1st argument is numeric);
 ;
 #X coords 0 1 4095 -1 200 140 1;
 #X restore 824 362 graph;
-#X connect 1 0 62 0;
+#X msg -7 520 compile cs6_demo.orc;
+#X connect 1 0 61 0;
 #X connect 2 0 42 0;
 #X connect 3 0 46 0;
 #X connect 4 0 5 0;
-#X connect 5 0 62 0;
+#X connect 5 0 61 0;
 #X connect 6 0 7 0;
-#X connect 7 0 62 0;
-#X connect 8 0 62 0;
-#X connect 9 0 62 0;
+#X connect 7 0 61 0;
+#X connect 8 0 61 0;
+#X connect 9 0 61 0;
 #X connect 10 0 47 0;
 #X connect 10 0 37 0;
 #X connect 10 0 11 0;
 #X connect 11 0 12 0;
 #X connect 12 0 50 0;
-#X connect 13 0 62 0;
+#X connect 13 0 61 0;
 #X connect 14 0 15 0;
-#X connect 15 0 62 0;
+#X connect 15 0 61 0;
 #X connect 16 0 17 0;
 #X connect 17 0 19 0;
 #X connect 18 0 17 1;
 #X connect 19 0 44 0;
-#X connect 35 0 62 0;
+#X connect 35 0 61 0;
 #X connect 36 0 51 0;
 #X connect 37 0 36 0;
-#X connect 40 0 62 0;
-#X connect 41 0 62 0;
+#X connect 40 0 61 0;
+#X connect 41 0 61 0;
 #X connect 42 0 19 1;
 #X connect 42 1 19 0;
-#X connect 43 0 62 3;
-#X connect 44 0 62 0;
-#X connect 46 0 62 0;
+#X connect 43 0 61 3;
+#X connect 44 0 61 0;
+#X connect 46 0 61 0;
 #X connect 47 0 49 0;
-#X connect 48 0 62 0;
-#X connect 60 0 62 0;
-#X connect 62 0 0 0;
-#X connect 62 1 0 1;
-#X connect 62 2 0 0;
-#X connect 62 3 0 1;
-#X connect 62 4 20 0;
-#X connect 62 5 21 0;
-#X connect 64 0 62 0;
+#X connect 48 0 61 0;
+#X connect 61 0 0 0;
+#X connect 61 1 0 1;
+#X connect 61 2 0 0;
+#X connect 61 3 0 1;
+#X connect 61 4 20 0;
+#X connect 61 5 21 0;
+#X connect 63 0 61 0;
+#X connect 65 0 61 0;
diff --git a/examples/control.csd b/examples/csound_floss_manual/control.csd
similarity index 100%
rename from examples/control.csd
rename to examples/csound_floss_manual/control.csd
diff --git a/examples/control.pd b/examples/csound_floss_manual/control.pd
similarity index 100%
rename from examples/control.pd
rename to examples/csound_floss_manual/control.pd
diff --git a/examples/controlout.csd b/examples/csound_floss_manual/controlout.csd
similarity index 100%
rename from examples/controlout.csd
rename to examples/csound_floss_manual/controlout.csd
diff --git a/examples/controlout.pd b/examples/csound_floss_manual/controlout.pd
similarity index 100%
rename from examples/controlout.pd
rename to examples/csound_floss_manual/controlout.pd
diff --git a/examples/event.csd b/examples/csound_floss_manual/event.csd
similarity index 100%
rename from examples/event.csd
rename to examples/csound_floss_manual/event.csd
diff --git a/examples/event.pd b/examples/csound_floss_manual/event.pd
similarity index 100%
rename from examples/event.pd
rename to examples/csound_floss_manual/event.pd
diff --git a/examples/fox.wav b/examples/csound_floss_manual/fox.wav
similarity index 100%
rename from examples/fox.wav
rename to examples/csound_floss_manual/fox.wav
diff --git a/examples/live.csd b/examples/csound_floss_manual/live.csd
similarity index 100%
rename from examples/live.csd
rename to examples/csound_floss_manual/live.csd
diff --git a/examples/live.pd b/examples/csound_floss_manual/live.pd
similarity index 100%
rename from examples/live.pd
rename to examples/csound_floss_manual/live.pd
diff --git a/examples/midi.csd b/examples/csound_floss_manual/midi.csd
similarity index 100%
rename from examples/midi.csd
rename to examples/csound_floss_manual/midi.csd
diff --git a/examples/midi.pd b/examples/csound_floss_manual/midi.pd
similarity index 100%
rename from examples/midi.pd
rename to examples/csound_floss_manual/midi.pd
diff --git a/examples/settings.pd b/examples/csound_floss_manual/settings.pd
similarity index 95%
rename from examples/settings.pd
rename to examples/csound_floss_manual/settings.pd
index 006383a..ed3ca09 100644
--- a/examples/settings.pd
+++ b/examples/csound_floss_manual/settings.pd
@@ -21,7 +21,7 @@ run 1 re-starts it;
 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
+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;
diff --git a/examples/tablecopy.csd b/examples/csound_floss_manual/tablecopy.csd
similarity index 100%
rename from examples/tablecopy.csd
rename to examples/csound_floss_manual/tablecopy.csd
diff --git a/examples/tablecopy.pd b/examples/csound_floss_manual/tablecopy.pd
similarity index 99%
rename from examples/tablecopy.pd
rename to examples/csound_floss_manual/tablecopy.pd
index 093b263..ef078ae 100644
--- a/examples/tablecopy.pd
+++ b/examples/csound_floss_manual/tablecopy.pd
@@ -9982,25 +9982,24 @@
 0.028595 -0.0039978 -0.00912476 0.0183105 0.043396 0.0409241 0.0132446
 ;
 #X coords 0 1 88199 -1 200 140 1;
-#X restore -729 2 graph;
-#X msg -752 197 tabset beats 1;
-#X obj -680 408 dac~;
-#X msg -721 226 event i 1 0 2 1;
-#X text -596 228 3) now play table 1 in csound again;
-#X text -639 199 2) copies from array "beats" to csound table no 1
-;
-#X msg -746 164 event i 1 0 2 1;
-#X text -620 164 1) play table 1 in csound and you will hear nothing
+#X restore 51 42 graph;
+#X msg 28 237 tabset beats 1;
+#X obj 100 448 dac~;
+#X msg 59 266 event i 1 0 2 1;
+#X text 184 268 3) now play table 1 in csound again;
+#X text 141 239 2) copies from array "beats" to csound table no 1;
+#X msg 34 204 event i 1 0 2 1;
+#X text 160 204 1) play table 1 in csound and you will hear nothing
 because the table is empty;
 #N canvas 0 50 450 300 (subpatch) 0;
 #X array fox 132300 float 2;
 #X coords 0 1 132299 -1 200 140 1;
-#X restore -463 8 graph;
-#X obj -681 366 csound6~ tablecopy.csd;
-#X msg -693 252 event i 1 0 2.7 2;
-#X text -556 254 4) play table 2 in csound;
-#X msg -666 288 tabget fox 2;
-#X text -559 290 5) copy this table to the pd array "fox";
+#X restore 317 48 graph;
+#X obj 99 406 csound6~ tablecopy.csd;
+#X msg 87 292 event i 1 0 2.7 2;
+#X text 224 294 4) play table 2 in csound;
+#X msg 114 328 tabget fox 2;
+#X text 221 330 5) copy this table to the pd array "fox";
 #X connect 1 0 9 0;
 #X connect 3 0 9 0;
 #X connect 6 0 9 0;
diff --git a/examples/iem_workshop/02_simple.csd b/examples/iem_workshop/02_simple.csd
new file mode 100644
index 0000000..80a29ad
--- /dev/null
+++ b/examples/iem_workshop/02_simple.csd
@@ -0,0 +1,33 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/03_sound.csd b/examples/iem_workshop/03_sound.csd
new file mode 100644
index 0000000..8f43856
--- /dev/null
+++ b/examples/iem_workshop/03_sound.csd
@@ -0,0 +1,40 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+instr 1 
+
+ aBeep poscil .2, 400
+ out aBeep, aBeep
+
+endin
+
+
+</CsInstruments>
+<CsScore>
+i 1 0 4
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/04_audio_thru.csd b/examples/iem_workshop/04_audio_thru.csd
new file mode 100644
index 0000000..9f57cfc
--- /dev/null
+++ b/examples/iem_workshop/04_audio_thru.csd
@@ -0,0 +1,40 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+instr Audio_Thru
+
+ aIn_1, aIn_2 inch 1, 2
+ out aIn_1, aIn_2
+
+endin
+schedule "Audio_Thru", 0, 999999
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/05_RM.csd b/examples/iem_workshop/05_RM.csd
new file mode 100644
index 0000000..b8a32e7
--- /dev/null
+++ b/examples/iem_workshop/05_RM.csd
@@ -0,0 +1,57 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+instr RM
+
+ ;receive audio from PD
+ aIn inch 1
+ 
+ ;receive modulator frequency, panning and volume from PD
+ kModFreq chnget "modfreq"
+ kPan chnget "pan" ;0..1
+ kVolDb chnget "vol_db"
+ 
+ ;smooth volume transitions
+ kVolDb port kVolDb, .01
+ 
+ ;perform ring modulation
+ aRM poscil aIn, kModFreq
+ 
+ ;volume and panning
+ aL, aR pan2 aRM*ampdb(kVolDb), kPan
+ 
+ ;output
+ out aL, aR
+
+endin
+schedule "RM", 0, 999999
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/06_event.csd b/examples/iem_workshop/06_event.csd
new file mode 100644
index 0000000..8c40278
--- /dev/null
+++ b/examples/iem_workshop/06_event.csd
@@ -0,0 +1,40 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+instr 1
+
+ aSine poscil .2, 400
+ aOut linenr aSine, .1, 1, .01
+ out aOut, aOut
+
+endin
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/07_midi.csd b/examples/iem_workshop/07_midi.csd
new file mode 100644
index 0000000..3eac90c
--- /dev/null
+++ b/examples/iem_workshop/07_midi.csd
@@ -0,0 +1,59 @@
+<CsoundSynthesizer>
+<CsOptions>
+-+rtmidi=null -M0 ;necessary for midi
+-m128 ;reduce printout
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+seed 0 ;always different seed
+
+instr 1
+
+ ;receive pitch and velocity from pd
+ iCps cpsmidi 
+ iDb veloc -30, 0
+ 
+ ;receive detuning (cent) and create random deviation
+ iDetune chnget "detune"
+ iDetune random -iDetune, iDetune
+ 
+ ;real frequency with detuning
+ iCps *= cent(iDetune)
+ 
+ ;create plucked string sound
+ aPluck pluck ampdb(iDb), iCps, iCps, 0, 1
+ 
+ ;envelope for release
+ aOut linenr aPluck, 0, .1, .01
+ 
+ ;output
+ out aOut, aOut
+
+endin
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/08_transpose.csd b/examples/iem_workshop/08_transpose.csd
new file mode 100644
index 0000000..1a2c78b
--- /dev/null
+++ b/examples/iem_workshop/08_transpose.csd
@@ -0,0 +1,51 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 8
+nchnls = 2
+0dbfs = 1
+
+instr 1
+
+ ;audio input from pd
+ aIn inch 1
+ 
+ ;transposition in cent
+ kTrans chnget "transpose"
+ 
+ ;perform fft and apply transposition
+ fIn pvsanal aIn, 512, 128, 512, 1
+ fTransp pvscale fIn, cent(kTrans)
+  
+ ;ifft and output
+ aTransp pvsynth fTransp
+ out aTransp, aTransp
+
+endin
+schedule(1,0,-1) ;run forever
+
+</CsInstruments>
+<CsScore>
+
+</CsScore>
+</CsoundSynthesizer>
+<bsbPanel>
+ <label>Widgets</label>
+ <objectName/>
+ <x>100</x>
+ <y>100</y>
+ <width>320</width>
+ <height>240</height>
+ <visible>true</visible>
+ <uuid/>
+ <bgcolor mode="nobackground">
+  <r>255</r>
+  <g>255</g>
+  <b>255</b>
+ </bgcolor>
+</bsbPanel>
+<bsbPresets>
+</bsbPresets>
diff --git a/examples/iem_workshop/cs_pd_01_start.pd b/examples/iem_workshop/cs_pd_01_start.pd
new file mode 100644
index 0000000..94adae6
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_01_start.pd
@@ -0,0 +1,11 @@
+#N canvas 334 317 450 300 10;
+#X obj 143 132 csound6~;
+#X text 141 111 one input per default (audio and control);
+#X text 95 62 type csound6~ in an object box;
+#X text 95 79 the csound6~ external will be loaded;
+#X text 40 15 install csound6~ from;
+#X text 43 31 https://github.com/csound/csound_pd;
+#X text 141 154 three outputs per default:;
+#X text 141 175 leftmost: audio;
+#X text 168 199 middle: control;
+#X text 196 223 rightmost: bang when done;
diff --git a/examples/iem_workshop/cs_pd_02_load_csd.pd b/examples/iem_workshop/cs_pd_02_load_csd.pd
new file mode 100644
index 0000000..de71aa6
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_02_load_csd.pd
@@ -0,0 +1,10 @@
+#N canvas 271 440 450 300 10;
+#X text 43 31 (here 02_simple.csd);
+#X obj 97 163 csound6~ 02_simple.csd;
+#X text 40 15 create a .csd file first;
+#X text 65 65 then type its name as argument;
+#X text 68 81 into the csound6~ object;
+#X text 95 122 note that the number of inlets and;
+#X text 94 139 outlets changed (now 2 = stereo);
+#X text 75 225 MAKE SURE CSOUND'S KSMPS IS NOT BIGGER;
+#X text 74 245 THAN PD'S BLOCK SIZE !;
diff --git a/examples/iem_workshop/cs_pd_03_sound.pd b/examples/iem_workshop/cs_pd_03_sound.pd
new file mode 100644
index 0000000..f620fbd
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_03_sound.pd
@@ -0,0 +1,16 @@
+#N canvas 247 559 450 300 10;
+#X obj 92 109 csound6~ 02_simple.csd;
+#X text 40 15 load a new .csd file with "open";
+#X msg 40 35 open 03_sound.csd;
+#X obj 98 162 dac~;
+#X obj 239 164 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 86 190 audio out;
+#X text 206 189 bang when done;
+#X text 134 61 "reset" recompiles the csd;
+#X msg 141 81 reset;
+#X connect 0 0 3 0;
+#X connect 0 1 3 1;
+#X connect 0 3 4 0;
+#X connect 2 0 0 0;
+#X connect 8 0 0 0;
diff --git a/examples/iem_workshop/cs_pd_04_live_input.pd b/examples/iem_workshop/cs_pd_04_live_input.pd
new file mode 100644
index 0000000..a6f53d3
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_04_live_input.pd
@@ -0,0 +1,14 @@
+#N canvas 247 564 450 300 10;
+#X obj 87 195 dac~;
+#X text 75 223 audio out;
+#X text 40 15 caution -- feedback is possible!;
+#X obj 81 142 csound6~ 04_audio_thru.csd;
+#X text 178 61 "run 0" stops csound;
+#X msg 185 81 run 0;
+#X text 71 46 audio in;
+#X obj 72 71 adc~;
+#X connect 3 0 0 0;
+#X connect 3 1 0 1;
+#X connect 5 0 3 0;
+#X connect 7 0 3 0;
+#X connect 7 1 3 1;
diff --git a/examples/iem_workshop/cs_pd_05_control_input.pd b/examples/iem_workshop/cs_pd_05_control_input.pd
new file mode 100644
index 0000000..36c7d99
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_05_control_input.pd
@@ -0,0 +1,29 @@
+#N canvas 247 579 450 456 10;
+#X obj 86 383 dac~;
+#X obj 81 45 adc~;
+#X obj 147 24 hsl 128 15 0 1000 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 4200 1;
+#X floatatom 143 50 5 0 0 0 - - -, f 5;
+#X msg 143 71 chnset modfreq \$1;
+#X text 189 49 ring modulator frequency;
+#X obj 80 330 csound6~ 05_RM.csd;
+#X obj 172 125 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 8600 1;
+#X text 166 103 panning;
+#X msg 169 151 chnset pan \$1;
+#X obj 203 215 hsl 128 15 -20 12 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 8000 1;
+#X text 197 193 volume;
+#X floatatom 200 235 5 0 0 0 - - -, f 5;
+#X msg 200 256 chnset vol_db \$1;
+#X connect 1 0 6 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 6 0;
+#X connect 6 0 0 0;
+#X connect 6 1 0 1;
+#X connect 7 0 9 0;
+#X connect 9 0 6 0;
+#X connect 10 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 6 0;
diff --git a/examples/iem_workshop/cs_pd_06_event.pd b/examples/iem_workshop/cs_pd_06_event.pd
new file mode 100644
index 0000000..df9331b
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_06_event.pd
@@ -0,0 +1,14 @@
+#N canvas 252 520 515 456 10;
+#X obj 54 211 dac~;
+#X obj 48 158 csound6~ 06_event.csd;
+#X msg 51 23 event i 1 0 3;
+#X text 167 22 start a simple event;
+#X msg 62 62 event i 1 0 -1;
+#X msg 74 88 event i -1 0 0;
+#X text 178 61 start "endless" event (duration -1);
+#X text 188 88 and stop it (negative instrument number);
+#X connect 1 0 0 0;
+#X connect 1 1 0 1;
+#X connect 2 0 1 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
diff --git a/examples/iem_workshop/cs_pd_07_midi.pd b/examples/iem_workshop/cs_pd_07_midi.pd
new file mode 100644
index 0000000..8d59a44
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_07_midi.pd
@@ -0,0 +1,23 @@
+#N canvas 181 571 515 456 10;
+#X obj 82 329 dac~;
+#X obj 53 61 notein;
+#X obj 52 90 pack;
+#X msg 51 118 midi 144 \$1 \$2;
+#X text 116 61 receive note-on messages;
+#X text 116 90 pack note number and velocity;
+#X text 166 117 send to csound (144 = note on messages);
+#X text 21 29 SET OPTION -+rtmidi=null -M0 IN YOUR CSD FILE!;
+#X obj 76 276 csound6~ 07_midi.csd;
+#X floatatom 201 191 5 0 0 0 - - -, f 5;
+#X msg 202 214 chnset detune \$1;
+#X text 251 191 maximum detune in cent (up and down);
+#X obj 201 153 ctlin 1 1;
+#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;
+#X connect 9 0 10 0;
+#X connect 10 0 8 0;
+#X connect 12 0 9 0;
diff --git a/examples/iem_workshop/cs_pd_08_FFT.pd b/examples/iem_workshop/cs_pd_08_FFT.pd
new file mode 100644
index 0000000..3bccb8e
--- /dev/null
+++ b/examples/iem_workshop/cs_pd_08_FFT.pd
@@ -0,0 +1,14 @@
+#N canvas 160 368 515 456 10;
+#X obj 66 225 dac~;
+#X floatatom 140 99 5 0 0 0 - - -, f 5;
+#X obj 140 62 ctlin 1 1;
+#X obj 66 47 adc~ 1;
+#X msg 141 123 chnset transpose \$1;
+#X text 190 100 transposition in cent;
+#X obj 60 172 csound6~ 08_transpose.csd;
+#X connect 1 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 6 0;
+#X connect 4 0 6 0;
+#X connect 6 0 0 0;
+#X connect 6 1 0 1;
diff --git a/examples/livein.csd b/examples/livein.csd
deleted file mode 100644
index fcca1ba..0000000
--- a/examples/livein.csd
+++ /dev/null
@@ -1,25 +0,0 @@
-<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>
-
diff --git a/examples/livein.pd b/examples/livein.pd
deleted file mode 100644
index 214ff2f..0000000
--- a/examples/livein.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#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;
diff --git a/src/csoundapi_tilde.c b/src/csoundapi_tilde.c
index 29d7e54..37598c9 100644
--- a/src/csoundapi_tilde.c
+++ b/src/csoundapi_tilde.c
@@ -25,7 +25,6 @@
 
 #include <stdio.h>
 #include <m_pd.h>
-#include <pthread.h>
 #if defined(__APPLE__)
 #include <CsoundLib64/csound.h>
 #else
@@ -137,7 +136,7 @@ PUBLIC void csound6_tilde_setup(void)
                 (t_method) csoundapi_destroy, sizeof(t_csoundapi),
                 CLASS_DEFAULT, A_GIMME, 0);
     class_addmethod(csoundapi_class, (t_method) csoundapi_dsp, gensym("dsp"),
-                    (t_atomtype) 0);
+                    A_CANT, 0);
     class_addmethod(csoundapi_class, (t_method) csoundapi_event,
                     gensym("event"), A_GIMME, 0);
     class_addmethod(csoundapi_class, (t_method) csoundapi_reset,
@@ -263,11 +262,11 @@ static void *csoundapi_new(t_symbol *s, int argc, t_atom *argv)
               strcpy(cmdl[i], x->curdir->s_name);
               strcat(cmdl[i],"/");
               strcat(cmdl[i],tmp);
-              post(cmdl[i]);
+              post("%s", cmdl[i]);
               free(tmp);
             }
         }
-        post(cmdl[i]);
+        post("%s", cmdl[i]);
       }
       cmdl[i] = "-d";
       x->argnum = argc + 2;
@@ -372,7 +371,7 @@ static t_int *csoundapi_perform(t_int *w)
           posn++;
         }
         for (n = 0; n < numlets; n++) {
-          out[n][i] = (t_float) (n < chans ? csout[pos] / scal : 0.0);
+          out[n][i] = (t_sample) (n < chans ? csout[pos] / scal : 0.0);
           pos++;
         }
       }
@@ -480,11 +479,11 @@ static void csoundapi_open(t_csoundapi *x, t_symbol *s, int argc, t_atom *argv)
             strcpy(cmdl[i], x->curdir->s_name);
             strcat(cmdl[i],"/");
             strcat(cmdl[i],tmp);
-            post(cmdl[i]);
+            post("%s", cmdl[i]);
             free(tmp);
           }
       }
-      post(cmdl[i]);
+      post("%s", cmdl[i]);
     }
     cmdl[i] = "-d";
     x->argnum = argc + 2;
@@ -569,7 +568,7 @@ static void csoundapi_tabget(t_csoundapi *x,  t_symbol *tab, t_float f)
     } else post("csound6~: csound table %d not found \n", (int) f);
 }
 
-void *thread_func(void *p){
+uintptr_t thread_func(void *p){
     t_csoundapi *pp = (t_csoundapi *) p;
     int size = 0;
     char c;
@@ -589,7 +588,7 @@ void *thread_func(void *p){
           strcat(orcfile,pp->orc);
         }
       else orcfile = pp->orc;
-    post(orcfile);
+    post("%s", orcfile);
 
     fp = fopen(orcfile, "rb");
     if(fp != NULL) {
@@ -598,7 +597,7 @@ void *thread_func(void *p){
 
       if(size==0) {
         fclose(fp);
-        return NULL;
+        return 0;
       }
 
       orc = (char *) malloc(size+1);
@@ -611,15 +610,14 @@ void *thread_func(void *p){
     else post("csound6~: could not open %s \n", pp->orc);
 
     free(orcfile);
-    return NULL;
+    return 0;
 }
 
 
 static void csoundapi_compile(t_csoundapi *x,  t_symbol *orc) {
-    pthread_t thread;
     if(x->orc != NULL) free(x->orc);
     x->orc = strdup(orc->s_name);
-    pthread_create(&thread, NULL, thread_func, x);
+    csoundCreateThread(thread_func, (void *) x);
 }
 
 
@@ -735,7 +733,7 @@ static void csoundapi_set_channel(t_csoundapi *x, t_symbol *s,
       if(i+1 < argc){
         if(argv[i+1].a_type == A_SYMBOL) {
           t_symbol *mess = atom_getsymbol(&argv[i+1]);
-          csoundSetStringChannel(csound, chn, mess->s_name);
+          csoundSetStringChannel(csound, chn, (char*)mess->s_name);
         }
         else if (argv[i+1].a_type == A_FLOAT) {
           csoundSetControlChannel(csound, chn, atom_getfloat(&argv[i+1]));
@@ -762,7 +760,7 @@ static void message_callback(CSOUND *csound,
         x->csmess[i-1]= ' ';
         break;
       }
-    if(x->csmess != NULL && x->messon) post(x->csmess);
+    if(x->csmess != NULL && x->messon) post("%s", x->csmess);
 }