Skip to content

Commit

Permalink
reorganize plugins layout: classes and help files now go into sc subf…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
yvol committed May 3, 2011
1 parent 51770b0 commit 50e0658
Show file tree
Hide file tree
Showing 436 changed files with 1,266 additions and 1,313 deletions.
11 changes: 6 additions & 5 deletions readme_devs.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
If you add a new plugin, please keep to this pattern:

Add a folder in the 'source' directory with your cpp|sc|html files.
This folder should end with "UGens", and starting with whichever standard pattern
in the filename you have for the UGens.
Add a folder in the 'source' directory, that ends with "UGens", and starting
with whichever standard pattern in the filename you have for the UGens.
Your source files should go into this directory. Beware, all your sc-specific
files (sc|html|txt|...) should go into a 'sc' subdirectory.

e.g. the GLitchUGens comprise:
source/GlitchUGens/GlitchUGens.cpp
source/GlitchUGens/GlitchUGens.html
source/GlitchUGens/GlitchUGens.sc
source/GlitchUGens/sc/GlitchUGens.html
source/GlitchUGens/sc/GlitchUGens.sc

then edit sc3-plugins/source/CMakeLists.txt and add your folder to PLUGIN_DIRS.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Alexander Sashnov
Alexander Sashnov
[email protected]
*/

Expand Down Expand Up @@ -61,7 +61,7 @@
# ifdef WIN32
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
# define DECLSPEC
# else
# define DECLSPEC __declspec(dllimport)
# endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef enum {
typedef struct
{
int tone_a; /**< R0, R1 */
int tone_b; /**< R2, R3 */
int tone_b; /**< R2, R3 */
int tone_c; /**< R4, R5 */
int noise; /**< R6 */
int R7_tone_a; /**< R7 bit 0 */
Expand Down Expand Up @@ -78,7 +78,7 @@ ayemu_sndfmt_t;
/*@{*/

/** Data structure for sound chip emulation \internal
*
*
*/
typedef struct
{
Expand All @@ -87,7 +87,7 @@ typedef struct
ayemu_chip_t type; /**< general chip type (\b AYEMU_AY or \b AYEMU_YM) */
int ChipFreq; /**< chip emulator frequency */
int eq[6]; /**< volumes for channels.
Array contains 6 elements:
Array contains 6 elements:
A left, A right, B left, B right, C left and C right;
range -100...100 */
ayemu_regdata_t regs; /**< parsed registers data */
Expand Down Expand Up @@ -125,7 +125,7 @@ ayemu_init(ayemu_ay_t *ay);
EXTERN void
ayemu_reset(ayemu_ay_t *ay);

EXTERN int
EXTERN int
ayemu_set_chip_type(ayemu_ay_t *ay, ayemu_chip_t chip, int *custom_table);

EXTERN void
Expand All @@ -137,7 +137,7 @@ ayemu_set_stereo(ayemu_ay_t *ay, ayemu_stereo_t stereo, int *custom_eq);
EXTERN int
ayemu_set_sound_format (ayemu_ay_t *ay, int freq, int chans, int bits);

EXTERN void
EXTERN void
ayemu_set_regs (ayemu_ay_t *ay, unsigned char *regs);

EXTERN void*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ typedef struct
\return Return true if success, else false
*/
EXTERN int ayemu_vtx_open(ayemu_vtx_t *vtx, const char *filename);

/** Read and encode lha data from .vtx file.
* \return Return pointer to unpacked data or NULL.
*/
EXTERN char *ayemu_vtx_load_data(ayemu_vtx_t *vtx);

/** Print formated file name. If fmt is NULL the default format %a - %t will used
* \return none.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void *ayemu_gen_sound(ayemu_ay_t *ay, void *buff, size_t sound_bufsize)
snd_numcount = sound_bufsize / (ay->sndfmt.channels * (ay->sndfmt.bpc >> 3));
while (snd_numcount-- > 0) {
mix_l = mix_r = 0;

for (m = 0 ; m < ay->ChipTacts_per_outcount ; m++) {
if (++ay->cnt_a >= ay->regs.tone_a) {
ay->cnt_a = 0;
Expand All @@ -426,15 +426,15 @@ void *ayemu_gen_sound(ayemu_ay_t *ay, void *buff, size_t sound_bufsize)
ay->cnt_c = 0;
ay->bit_c = ! ay->bit_c;
}

/* GenNoise (c) Hacker KAY & Sergey Bulba */
if (++ay->cnt_n >= (ay->regs.noise * 2)) {
ay->cnt_n = 0;
ay->Cur_Seed = (ay->Cur_Seed * 2 + 1) ^ \
(((ay->Cur_Seed >> 16) ^ (ay->Cur_Seed >> 13)) & 1);
(((ay->Cur_Seed >> 16) ^ (ay->Cur_Seed >> 13)) & 1);
ay->bit_n = ((ay->Cur_Seed >> 16) & 1);
}

if (++ay->cnt_e >= ay->regs.env_freq) {
ay->cnt_e = 0;
if (++ay->env_pos > 127)
Expand All @@ -448,23 +448,23 @@ void *ayemu_gen_sound(ayemu_ay_t *ay, void *buff, size_t sound_bufsize)
mix_l += ay->vols[0][tmpvol];
mix_r += ay->vols[1][tmpvol];
}

if ((ay->bit_b | !ay->regs.R7_tone_b) & (ay->bit_n | !ay->regs.R7_noise_b)) {
tmpvol =(ay->regs.env_b)? ENVVOL : ay->regs.vol_b * 2 + 1;
mix_l += ay->vols[2][tmpvol];
mix_r += ay->vols[3][tmpvol];
}

if ((ay->bit_c | !ay->regs.R7_tone_c) & (ay->bit_n | !ay->regs.R7_noise_c)) {
tmpvol = (ay->regs.env_c)? ENVVOL : ay->regs.vol_c * 2 + 1;
mix_l += ay->vols[4][tmpvol];
mix_r += ay->vols[5][tmpvol];
}
}
} /* end for (m=0; ...) */

mix_l /= ay->Amp_Global;
mix_r /= ay->Amp_Global;

if (ay->sndfmt.bpc == 8) {
mix_l = (mix_l >> 8) | 128; /* 8 bit sound */
mix_r = (mix_r >> 8) | 128;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 14 additions & 24 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ macro(BUILD_PLUGIN PLUGIN_NAME PLUGIN_SOURCES PLUGIN_LIBS)
endmacro()


# INSTALL_DIST_FILES
# GLOB patterns are extra arguments
macro(INSTALL_DIST_FILES SEARCH_DIR DESTINATION)
# TODO: new help system files?
file(GLOB_RECURSE DIST_FILES RELATIVE "${SEARCH_DIR}" ${ARGN})
install(FILES ${DIST_FILES}
DESTINATION "${DESTINATION}"
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endmacro()


#-----------------------
# plugins without extras
#-----------------------
Expand Down Expand Up @@ -113,9 +102,9 @@ set(PLUGIN_DIRS
set(PLUGIN_DIRS_EXTRA
AYUGens
LadspaUGen
MembraneUGen
MembraneUGens
NCAnalysisUGens
PitchDetectionUGens
PitchDetection
StkUGens
TJUGens
)
Expand Down Expand Up @@ -157,13 +146,6 @@ foreach(DIR ${PLUGIN_DIRS})
FIND_AND_BUILD_PLUGINS(${DIR})
endforeach(DIR)

# install help and sc files
list(APPEND ${PLUGIN_DIRS} ${PLUGIN_DIRS_EXTRA})
foreach(DIR ${PLUGIN_DIRS})
INSTALL_DIST_FILES("${CMAKE_CURRENT_SOURCE}" "${INSTALL_DESTINATION_DISTRO}/${DIR}"
"${DIR}/*.html" "${DIR}/*.rtf" "${DIR}/*.sc" "${DIR}/*.scd")
endforeach(DIR)


#---------------------
# plugins with extras:
Expand Down Expand Up @@ -210,19 +192,19 @@ set(FFTSOURCES
scfft_old/SCComplex.cpp
)

file(GLOB NCAnalysisSources NCAnalysis/*cpp)
file(GLOB NCAnalysisSources NCAnalysisUGens/*cpp)
if(APPLE)
set (NCAnalysisLibs "-framework vecLib")
else()
set (NCAnalysisLibs ${FFTW3F_LIBRARY})
endif()

BUILD_PLUGIN(NCAnalysis "${NCAnalysisSources};${FFTSOURCES}" ${NCAnalysisLibs})
BUILD_PLUGIN(NCAnalysisUGens "${NCAnalysisSources};${FFTSOURCES}" ${NCAnalysisLibs})

# AYUGens
if (AY)
include_directories(AY_libayemu/include)
BUILD_PLUGIN(AY_UGen "AYUGens/AY_UGen.cpp;AY_libayemu/src/ay8912.c" "")
include_directories(AYUGens/AY_libayemu/include)
BUILD_PLUGIN(AY_UGen "AYUGens/AY_UGen.cpp;AYUGens/AY_libayemu/src/ay8912.c" "")
endif()

# TJUGens
Expand All @@ -238,6 +220,7 @@ endif()
# INSTALL
#--------

# plugins
install(TARGETS ${plugins}
DESTINATION ${INSTALL_DESTINATION}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
Expand All @@ -249,3 +232,10 @@ install(TARGETS ${supernova_plugins}
install(TARGETS ladspalist
DESTINATION ${INSTALL_DESTINATION_LADSPALIST}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

# install help and sc specific files that are found in 'PLUGIN_NAME/sc' folder
foreach (DIR ${PLUGIN_DIRS};${PLUGIN_DIRS_EXTRA})
install(DIRECTORY "${DIR}/sc/" DESTINATION "${INSTALL_DESTINATION_DISTRO}/${DIR}"
PATTERN "*"
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endforeach(DIR)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 50e0658

Please sign in to comment.