Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cianoc committed May 19, 2018
0 parents commit e4f0e0e
Show file tree
Hide file tree
Showing 5 changed files with 439 additions and 0 deletions.
89 changes: 89 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
set(FILENAME "SinOp.cpp") #specify the .cpp file here
cmake_minimum_required (VERSION 2.8)
get_filename_component(PROJECT ${FILENAME} NAME_WE) #automatically sets project name from the filename
# set(PROJECT "my_name") #alternatively set project name manually
message(STATUS "Project name is ${PROJECT}")
project (${PROJECT})

include_directories(${SC_PATH}/include/plugin_interface)
include_directories(${SC_PATH}/include/common)
include_directories(${SC_PATH}/common)

set(CMAKE_SHARED_MODULE_PREFIX "")
if(APPLE OR WIN32)
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
endif()

option(SUPERNOVA "Build plugins for supernova" OFF)
if (SUPERNOVA)
include_directories(${SC_PATH}/external_libraries/nova-tt)
# actually just boost.atomic
include_directories(${SC_PATH}/external_libraries/boost)
include_directories(${SC_PATH}/external_libraries/boost_lockfree)
include_directories(${SC_PATH}/external_libraries/boost-lockfree)
endif()

option(CPP11 "Build with c++11." ON)

if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_COMPILER_IS_CLANG 1)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
add_definitions(-fvisibility=hidden)

include (CheckCCompilerFlag)
include (CheckCXXCompilerFlag)

CHECK_C_COMPILER_FLAG(-msse HAS_SSE)
CHECK_CXX_COMPILER_FLAG(-msse HAS_CXX_SSE)

if (HAS_SSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")
endif()
if (HAS_CXX_SSE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
endif()

CHECK_C_COMPILER_FLAG(-msse2 HAS_SSE2)
CHECK_CXX_COMPILER_FLAG(-msse2 HAS_CXX_SSE2)

if (HAS_SSE2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()
if (HAS_CXX_SSE2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
endif()

CHECK_C_COMPILER_FLAG(-mfpmath=sse HAS_FPMATH_SSE)
CHECK_CXX_COMPILER_FLAG(-mfpmath=sse HAS_CXX_FPMATH_SSE)

if (HAS_FPMATH_SSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
endif()
if (HAS_CXX_FPMATH_SSE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
endif()

if(NATIVE)
add_definitions(-march=native)
endif()

if(CPP11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if(CMAKE_COMPILER_IS_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
endif()
endif()
if(MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
endif()

add_library(${PROJECT} MODULE ${FILENAME})
if(SUPERNOVA)
add_library(${PROJECT}_supernova MODULE ${FILENAME})
set_property(TARGET ${PROJECT}_supernova
PROPERTY COMPILE_DEFINITIONS SUPERNOVA)
endif()
28 changes: 28 additions & 0 deletions HelpSource/Classes/SinOp.schelp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
TITLE:: SinOp
summary:: Feedback PM oscillator
categories:: UGens>Generators>Deterministic

DESCRIPTION::
SinOp is a sine oscillator that has phase modulation feedback. Positive feedback creates a sawtooth like wave, negative feedback a square like wave. Overmodulation creates chaotic oscillation.

CLASSMETHODS::

METHOD:: ar

ARGUMENT:: freq
The base frequency of the oscillator in Hertz. This can be audio, or control, rate.

ARGUMENT:: phase
The phase of the oscillator in radians. This can be audio, or control, rate.

ARGUMENT:: feedback
Phase feedback multiplier. Negative values create a square wave, positive values a saw tooth. Large values create noise. This can only be control rate.

INSTANCEMETHODS::


EXAMPLES::

code::
(some example code)
::
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# cian-plugins
Loading

0 comments on commit e4f0e0e

Please sign in to comment.