Commit 3e296dce authored by Dan Stowell's avatar Dan Stowell

Imported Upstream version 3.6.1~repack

parent 2f8347e4

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -107,7 +107,6 @@ if(APPLE)
APPEND
PROPERTY COMPILE_DEFINITIONS SC_DARWIN)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions("-DSC_LINUX")
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_definitions("-DSC_FREEBSD")
......@@ -130,6 +129,8 @@ if(WIN32)
add_definitions(-DBOOST_THREAD_USE_LIB)
#avoid unnecesary autolink
add_definitions(-DBOOST_DATE_TIME_NO_LIB)
add_definitions(-DBOOST_CHRONO_HEADER_ONLY)
endif()
......@@ -146,10 +147,14 @@ option(SSE "Compile with support for SSE instructions.")
option(SSE41 "Compile with support for SSE4.1 instructions.")
option(SSE42 "Compile with support for SSE4.2 instructions.")
set(AUDIOAPI "default" CACHE STRING "Audio API to use (one of {default,coreaudio,jack,portaudio})")
option(LIBSCSYNTH "Compile libscsynth as shared library" OFF)
option(INSTALL_HELP "Install help docs and examples along with the software" ON)
option(INSTALL_OLD_HELP "Install old and deprecated help files" ON)
option(SC_DOC_RENDER "Pre-render SCDoc documentation. (For putting online, etc)" OFF)
option(SC_IDE "Build Qt IDE." ON)
option(ENABLE_TESTSUITE "Compile testsuite." ON)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
option(SUPERNOVA "Build with supernova as optional audio synthesis server" ON)
......@@ -176,12 +181,6 @@ if (SC_QT)
message( STATUS "Compiling with Qt GUI" )
endif (SC_QT)
if(WIN32)
option(SC_PSYCOLLIDER "Build PsyCollider" ON)
else()
option(SC_PSYCOLLIDER "Build PsyCollider" OFF)
endif()
if(WIN32)
option(SC_WIN_DEP_DIRS
"A list of directories where dependencies will be searched for when packaging.")
......@@ -195,6 +194,9 @@ endif()
option(SC_SYMLINK_CLASSLIB "Place a symlink of SCCLassLibrary instead of copying" OFF)
option(SC_OX "Try to compile with support for C++0x (experimental, mainly related to supernova)" OFF)
option(SYSTEM_BOOST "Use boost libraries from system" OFF)
option(SYSTEM_YAMLCPP "Use yaml-cpp library from system" ON)
#############################################
# some default libraries
......@@ -205,7 +207,7 @@ if (NOT PTHREADS_FOUND)
endif()
include_directories(${PTHREADS_INCLUDE_DIR})
if (MSVC OR MINGW)
if(MSVC OR MINGW)
set(MATH_LIBRARY "")
else()
find_library(MATH_LIBRARY m)
......@@ -219,20 +221,22 @@ if(CURL)
endif()
endif()
set(Boost_USE_MULTITHREADED ON)
find_package( Boost 1.48.0 COMPONENTS thread system filesystem program_options regex )
if (SC_OX)
set(Boost_FOUND OFF) # boost 1.48 does not like c++11
if(SYSTEM_BOOST)
set(Boost_USE_MULTITHREADED ON)
find_package( Boost 1.50.0 COMPONENTS thread system filesystem program_options regex test_exec_monitor )
endif()
if (Boost_FOUND)
link_directories(${Boost_LIBRARY_DIRS})
else()
message("building boost libraries manually")
message(STATUS "building boost libraries manually")
endif()
if(SYSTEM_YAMLCPP)
find_package(YamlCpp)
else()
set(YAMLCPP_FOUND OFF)
endif()
#############################################
# some preprocessor flags
......@@ -284,9 +288,14 @@ endif()
#############################################
# subdirectories
add_subdirectory(external_libraries)
if(NOT YAMLCPP_FOUND)
set(YAMLCPP_LIBRARY yaml)
set(YAMLCPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp-0.3.0/include)
endif()
add_subdirectory(server)
add_subdirectory(lang)
add_subdirectory(bindings)
add_subdirectory(editors)
add_subdirectory(platform)
......@@ -320,7 +329,7 @@ if(NOT SC_QT)
endif()
if(WIN32)
set(SCCLASSLIB_EXCLUDE_REGEX "${SCCLASSLIB_EXCLUDE_REGEX}|PsycolliderDocument")
set(SCCLASSLIB_EXCLUDE_REGEX "${SCCLASSLIB_EXCLUDE_REGEX}")
endif()
......@@ -396,12 +405,6 @@ install(DIRECTORY examples
PATTERN "*#" EXCLUDE
)
if(INSTALL_OLD_HELP)
install(DIRECTORY Help
DESTINATION ${auxresourcesdir}
)
endif()
if(INSTALL_HELP)
if(SC_SYMLINK_CLASSLIB AND APPLE)
message(STATUS "Will create symlink of HelpSource to ${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource")
......@@ -469,7 +472,9 @@ set_directory_properties(
#
# testsuite
#
add_subdirectory(testsuite)
if(ENABLE_TESTSUITE)
add_subdirectory(testsuite)
endif()
#############################################
# CPack support
......@@ -503,4 +508,3 @@ mark_as_advanced(JACK JACK_INCLUDE_DIR JACK_LIBRARY)
mark_as_advanced(MATH_LIBRARY)
mark_as_advanced(QT_QMAKE_EXECUTABLE)
mark_as_advanced(SNDFILE)
......@@ -5,6 +5,7 @@ User-visible changes (started after 3.4)
* only warn about FunctionDef not being inlined if a compiler flag is set - ds
* new help system (SCDoc) - jli
* new help browser (HelpBrowser) - jle/jli
* on OS X, standalone apps look use appSupportDir with the app's name = jp
* bitwise ops (<< >> & | ^) on ugens - jli
* new VarLag ugen - rk/jli
* new method: Node-onFree, run function when node finishes - jli
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.42">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #a71e12}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px}
span.s1 {color: #000000}
span.s2 {color: #0019b7}
span.s3 {color: #326f17}
span.s4 {color: #606060}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><b>Backwards Compatibility</b></p>
<p class="p2"><br></p>
<p class="p3">There are a number of classes and methods that have been added to allow for backwards compatibility with SC2 code. The most notable of these is Synth.play, which is basically a wrapper for Function.play.</p>
<p class="p2"><br></p>
<p class="p4"><span class="s1">{ </span><span class="s2">SinOsc</span><span class="s1">.ar(440, 0, 0.5) }.play; </span>// creates an arbitrarily named SynthDef and a Synth to play it</p>
<p class="p4"><span class="s2">Synth</span><span class="s1">.play({ </span><span class="s2">SinOsc</span><span class="s1">.ar(440, 0, 0.5) }); </span>// in SC3 just a wrapper for Function.play with fewer args</p>
<p class="p2"><br></p>
<p class="p3">Both of these will create synth nodes on the default server. Note that neither requires the use of an Out.ar ugen; they simply output to the first audio bus. One can however add an Out to Function.play in order to specify.</p>
<p class="p2"><br></p>
<p class="p5"><span class="s2">Synth</span>.play({ <span class="s2">Out</span>.ar(1, <span class="s2">SinOsc</span>.ar(440, 0, 0.5)) });</p>
<p class="p2"><br></p>
<p class="p3">In general, one should be aware of this distinction when using this code. When copying such code for reuse with other SC3 classes (for example in a reusable SynthDef), it will usually be necessary to add an Out.ar. Although useful for quick testing these methods are generally inferior to SynthDef.play, as the latter is more direct, requires no modifications for general reuse, has greater general flexibility and has slightly less overhead. (Although this is insignificant in most cases, it could be relevant when large numbers of defs or nodes are being created.)<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p3">Like SynthDef.play, Function.play returns a Synth object which can then be messaged, etc. However, since Function.play creates an arbitrarily named SynthDef, one cannot reuse the resulting def, at least not without reading its name from the post window, or getting it from the Synth object.</p>
<p class="p2"><br></p>
<p class="p4">//The following examples are functionally equivalent</p>
<p class="p5">x = { <span class="s2">arg</span> freq = 440; <span class="s2">Out</span>.ar(1, <span class="s2">SinOsc</span>.ar(freq, 0, 0.5)) }.play(fadeTime: 0);<span class="Apple-converted-space"> </span></p>
<p class="p4"><span class="s1">x.set(</span><span class="s3">\freq</span><span class="s1">, 880); <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// you can set arguments</p>
<p class="p4"><span class="s1">y = </span><span class="s2">Synth</span><span class="s1">.new(x.defName); <span class="Apple-tab-span"> </span></span>// get the arbitrary defname from x</p>
<p class="p5">x.free;</p>
<p class="p5">y.free;</p>
<p class="p6"><br></p>
<p class="p5">x = <span class="s2">SynthDef</span>(<span class="s4">"backcompat-sine"</span>, { <span class="s2">arg</span> freq = 440; <span class="s2">Out</span>.ar(1, <span class="s2">SinOsc</span>.ar(freq, 0, 0.5)) }).play;<span class="Apple-converted-space"> </span></p>
<p class="p5">x.set(<span class="s3">\freq</span>, 880);</p>
<p class="p7"><span class="s1">y = </span><span class="s2">Synth</span><span class="s1">.new(</span>"backcompat-sine"<span class="s1">);</span></p>
<p class="p5">x.free;</p>
<p class="p5">y.free;</p>
<p class="p8"><br></p>
<p class="p3">Function.play is in general superior to both its SC2 equivalent and Synth.play. It has a number of significant features such as the ability to specify the output bus and fade times as arguments. See the <b>Function</b> helpfile for a more in-depth discussion.</p>
<p class="p2"><br></p>
<p class="p3">A number of other classes and methods have also been added to improve compatibility. These are listed below. In general there are equivalent or better ways of doing the same things in SC3.</p>
<p class="p2"><br></p>
<p class="p3"><b>Synth *play<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>use Function.play or SynthDef.play</p>
<p class="p3"><b>GetFileDialog</b><span class="Apple-converted-space">  <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>use CocoaDialog</p>
<p class="p3"><b>GetStringDialog</b></p>
<p class="p3"><b>Synth *stop</b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>use Server.freeAll</p>
<p class="p3"><b>Synth *isPlaying</b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Server.numSynths (this will include non-running nodes)</p>
<p class="p3"><b>Mix *ar *arFill<span class="Apple-tab-span"> </span></b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>use Mix *new and *fill</p>
<p class="p3"><b>SimpleNumber.rgb</b></p>
<p class="p3"><b>Rawarray.write</b></p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.41">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
</style>
</head>
<body>
<p class="p1"><b>SuperCollider 3 versus SuperCollider 2</b></p>
<p class="p2"><br></p>
<p class="p3">There are a number of ways in which SuperCollider 3 (or SCServer) is very different from SC2.</p>
<p class="p2"><br></p>
<p class="p3">A discussion of this is organised in the following documents:</p>
<p class="p2"><br></p>
<p class="p3"><b>ClientVsServer </b>- Separate language and synthesis apps.</p>
<p class="p2"><br></p>
<p class="p3"><b>SynthDefsVsSynths </b>- The use of precompiled SynthDefs as opposed to always compiling on the fly.</p>
<p class="p2"><br></p>
<p class="p3"><b>Spawning </b>- The lack of the Spawn and TSpawn ugens and their various convienence classes.</p>
<p class="p2"><br></p>
<p class="p3"><b>Sync-Async</b> - The problem of simultaneous synchronous and asynchronous execution.</p>
<p class="p2"><br></p>
<p class="p3"><b>Backwards-Compatibility</b> - A discussion some classes and methods which have been added to improve compatibility with SC2 code, and their limitations.</p>
<p class="p2"><br></p>
<p class="p3">(Select the bold text and type Cmd-d to open the corresponding file.)</p>
<p class="p2"><br></p>
<p class="p3">Note that these documents are not intended to be exhaustive tutorials, just an introduction to some of the differences. Close examination of the helpfiles of relevant classes should help to fill in the details. These files may be of some use to beginners as well.</p>