You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(42) |
Aug
(91) |
Sep
(97) |
Oct
(69) |
Nov
(16) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(74) |
Feb
(109) |
Mar
(117) |
Apr
(86) |
May
(84) |
Jun
(47) |
Jul
(30) |
Aug
(25) |
Sep
(39) |
Oct
(59) |
Nov
(42) |
Dec
(38) |
2010 |
Jan
(30) |
Feb
(43) |
Mar
(59) |
Apr
(67) |
May
(29) |
Jun
(47) |
Jul
(48) |
Aug
(22) |
Sep
(22) |
Oct
(36) |
Nov
(40) |
Dec
(3) |
2011 |
Jan
(39) |
Feb
(21) |
Mar
(36) |
Apr
(35) |
May
(8) |
Jun
|
Jul
(14) |
Aug
(4) |
Sep
(10) |
Oct
(27) |
Nov
(1) |
Dec
|
2012 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(9) |
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(15) |
Oct
(1) |
Nov
(3) |
Dec
(6) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(15) |
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
(5) |
Mar
|
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(19) |
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
(2) |
2017 |
Jan
(16) |
Feb
(8) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(7) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(14) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(3) |
Dec
|
2023 |
Jan
(1) |
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bor...@us...> - 2025-06-10 13:55:10
|
Revision: 3809 http://sourceforge.net/p/ftm/code/3809 Author: borghesi Date: 2025-06-10 13:55:09 +0000 (Tue, 10 Jun 2025) Log Message: ----------- new 2.8.2 relesase Modified Paths: -------------- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj Modified: trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2025-06-10 13:49:56 UTC (rev 3808) +++ trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2025-06-10 13:55:09 UTC (rev 3809) @@ -711,6 +711,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -722,6 +724,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( parser.c, @@ -734,6 +738,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -745,6 +751,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( parser.h, @@ -757,6 +765,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( parser.c, @@ -769,6 +779,8 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; + inputFiles = ( + ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -2746,11 +2758,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"01/2023\\\""; + VERSION_DATE = "\\\"06/2024\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 1; + VERSION_RELEASE = 2; VERSION_TAG = "\\\"\\\""; }; name = Debug_optimised; @@ -2966,11 +2978,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"01/2023\\\""; + VERSION_DATE = "\\\"06/2024\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 1; + VERSION_RELEASE = 2; VERSION_TAG = "\\\"\\\""; }; name = Debug; @@ -3042,11 +3054,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"01/2023\\\""; + VERSION_DATE = "\\\"06/2024\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 1; + VERSION_RELEASE = 2; VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; @@ -3200,11 +3212,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"01/2023\\\""; + VERSION_DATE = "\\\"06/2024\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 1; + VERSION_RELEASE = 2; VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; @@ -3550,11 +3562,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"01/2023\\\""; + VERSION_DATE = "\\\"06/2024\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 1; + VERSION_RELEASE = 2; VERSION_TAG = "\\\"\\\""; }; name = Debug_harder; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2025-06-10 13:49:58
|
Revision: 3808 http://sourceforge.net/p/ftm/code/3808 Author: borghesi Date: 2025-06-10 13:49:56 +0000 (Tue, 10 Jun 2025) Log Message: ----------- update of ftm.editor to current version of ImtrEditor Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c trunk/ftm/ftmlib/predefsymbols.h Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2025-06-10 13:49:03 UTC (rev 3807) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2025-06-10 13:49:56 UTC (rev 3808) @@ -466,7 +466,7 @@ } static void * -fts_get_object_for_buffer_default(void *obj, void *context, int objectIndex, int bufferIndex) +fts_get_object_for_buffer_default(void *obj, void *context, int objectIndex, int bufferIndex, int hasAudioBuffer) { return obj; } @@ -729,6 +729,18 @@ return fts_symbol_name(fts_s_value); } +static int +bpf_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *name) +{ + fts_symbol_t colName = fts_new_symbol(name); + int colIndex = -1; + if(colName == fts_s_time) + colIndex = 0; + else if(colName == fts_s_value) + colIndex = 1; + return colIndex; +} + static void bpf_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -807,6 +819,7 @@ bpf_gui_interface_matrix.getObject = bpf_gui_matrix_get_object; bpf_gui_interface_matrix.releaseObject = bpf_gui_matrix_release_object; bpf_gui_interface_matrix.getColumnName = bpf_gui_matrix_get_column_name; + bpf_gui_interface_matrix.getColumnIndexByName = bpf_gui_matrix_get_column_index_by_name; bpf_gui_interface_matrix.getToolbarConfig = bpf_gui_matrix_get_toolbar_config; bpf_gui_interface_matrix.insertRow = bpf_gui_matrix_insert_row; bpf_gui_interface_matrix.removeRow = bpf_gui_matrix_remove_row; @@ -1006,6 +1019,20 @@ return fts_symbol_name(fts_s_value); } +static int +dict_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *name) +{ + fts_symbol_t colName = fts_new_symbol(name); + int colIndex = -1; + + if(colName == fts_s_key) + colIndex = 0; + else if(colName == fts_s_value) + colIndex = 1; + + return colIndex; +} + static void dict_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -1082,6 +1109,7 @@ dict_gui_interface_matrix.getObject = dict_gui_matrix_get_object; dict_gui_interface_matrix.releaseObject = dict_gui_matrix_release_object; dict_gui_interface_matrix.getColumnName = dict_gui_matrix_get_column_name; + dict_gui_interface_matrix.getColumnIndexByName = dict_gui_matrix_get_column_index_by_name; dict_gui_interface_matrix.getToolbarConfig = dict_gui_matrix_get_toolbar_config; dict_gui_interface_matrix.insertRow = dict_gui_matrix_insert_row; dict_gui_interface_matrix.removeRow = dict_gui_matrix_remove_row; @@ -2201,6 +2229,18 @@ return 0; } +static int +mat_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *colname) +{ + mat_t *self = (mat_t *) obj; + fts_schema_t *colschema = mat_get_schema(self, 2); + int colIndex = -1; + if(colschema != NULL) + colIndex = fts_schema_get_index(colschema, fts_new_symbol(colname)); + + return colIndex; +} + static void mat_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -2274,6 +2314,7 @@ mat_gui_interface_matrix.getObject = mat_gui_matrix_get_object; mat_gui_interface_matrix.releaseObject = mat_gui_matrix_release_object; mat_gui_interface_matrix.getColumnName = mat_gui_matrix_get_column_name; + mat_gui_interface_matrix.getColumnIndexByName = mat_gui_matrix_get_column_index_by_name; mat_gui_interface_matrix.getToolbarConfig = mat_gui_matrix_get_toolbar_config; mat_gui_interface_matrix.insertRow = mat_gui_matrix_insert_row; mat_gui_interface_matrix.removeRow = mat_gui_matrix_remove_row; @@ -2356,6 +2397,7 @@ } return mean; } + static void fm_get_means_in_range(fmat_t *mat, int start, int end, int stride, int onset, double *meanPos, double *meanNeg) { @@ -2386,8 +2428,8 @@ numNeg++; } } + *meanPos = (numPos > 0) ? sqrt(vmeanPos/numPos) : 0; *meanNeg = (numNeg > 0) ? -sqrt(vmeanNeg/numNeg) : 0; - *meanNeg = (numNeg > 0) ? -sqrt(vmeanNeg/numNeg) : 0; } } @@ -3199,9 +3241,9 @@ return maxNumParams; } -static void -fmat_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, - int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, void **readHash, void **writeHash) +static void +fmat_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, const char *opacityColName, + int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, int *opacityColIndex, void **readHash, void **writeHash) { fmat_t *self = (fmat_t *)obj; fts_schema_t *colschema = fmat_get_schema(self, 2); @@ -3210,12 +3252,14 @@ *valueColIndex = fts_schema_get_index(colschema, fts_new_symbol(valueColName)); *colorColIndex = fts_schema_get_index(colschema, fts_new_symbol(colorColName)); *thicknessColIndex = fts_schema_get_index(colschema, fts_new_symbol(thicknessColName)); + *opacityColIndex = fts_schema_get_index(colschema, fts_new_symbol(opacityColName)); } else { *valueColIndex = 0; *colorColIndex = (self->n > 1) ? 1 : -1; - *thicknessColIndex = (self->n > 1) ? 2 : -1; + *thicknessColIndex = (self->n > 1) ? 2 : -1; + *thicknessColIndex = (self->n > 2) ? 3 : -1; } *readHash = fts_malloc(sizeof(fts_hashtable_t)); *writeHash = fts_malloc(sizeof(fts_hashtable_t)); @@ -3335,7 +3379,7 @@ } static void -fmat_gui_traces_get_ptr(void *obj, void *context, int *stride, int *colStride, float **ptr, int *ringIndex, int *ringSize, int *ringTale) +fmat_gui_traces_get_ptr(void *obj, void *context, int *stride, int *colStride, float **ptr, int *ringIndex, int *ringSize, int *ringTale, int *varRows) { fmat_t *self = (fmat_t *)obj; *ptr = fmat_lock(self); @@ -3344,6 +3388,7 @@ *ringIndex = -1; *ringSize = 0; *ringTale = 0; + *varRows = 0; } static void @@ -3355,14 +3400,14 @@ } static int -fmat_gui_traces_get_trace(void *obj, void *context, int index, int valueIndex, - int indexColumnIndex, int valueColumnIdx, int colorColumnIndex, int thicknessColorIndex, - double *time, double *next_time, double *value, double *nextValue, - double *color, double *nextColor, double *thickness, double *nextThickness, void *readHash, void *writeHash) +fmat_gui_traces_get_trace(void *obj, void *context, int traceIndex, int valueIndex, + int indexColumnIndex, int valueColumnIdx, int colorColumnIndex, int thicknessColorIndex, int opacityColorIndex, + double *time, double *next_time, double *value, double *nextValue, + double *color, double *nextColor, double *thickness, double *nextThickness, double *opacity, double *nextOpacity, void *readHash, void *writeHash) { fmat_t *self = (fmat_t *)obj; - if(index < self->m) + if(traceIndex < self->m) { float *ptr = fmat_lock(self); int stride = fmat_get_n(self); @@ -3369,16 +3414,18 @@ int valueColumnIndex = valueColumnIdx; if(valueColumnIndex < 1) valueColumnIndex = 1; - *time = ptr[index*stride]; - *value = ptr[index*stride + valueColumnIndex]; - *color = (colorColumnIndex >= 0 && self->n > colorColumnIndex) ? ptr[index*stride + colorColumnIndex] : 0.0; - *thickness = (thicknessColorIndex >= 0 && self->n > thicknessColorIndex) ? ptr[index*stride + thicknessColorIndex] : 0.0; - if(index+1 < self->m) + *time = ptr[traceIndex*stride]; + *value = ptr[traceIndex*stride + valueColumnIndex]; + *color = (colorColumnIndex >= 0 && self->n > colorColumnIndex) ? ptr[traceIndex*stride + colorColumnIndex] : 0.0; + *thickness = (thicknessColorIndex >= 0 && self->n > thicknessColorIndex) ? ptr[traceIndex*stride + thicknessColorIndex] : 0.0; + *opacity = (opacityColorIndex >= 0 && self->n > opacityColorIndex) ? ptr[traceIndex*stride + opacityColorIndex] : 1.0; + if(traceIndex+1 < self->m) { - *next_time = ptr[(index+1)*stride]; - *nextValue = ptr[(index+1)*stride + valueColumnIndex]; - *nextColor = (colorColumnIndex >= 0 && self->n > colorColumnIndex) ? ptr[(index+1)*stride + colorColumnIndex] : 0.0; - *nextThickness = (thicknessColorIndex >= 0 && self->n > thicknessColorIndex) ? ptr[(index+1)*stride + thicknessColorIndex] : 0.0; + *next_time = ptr[(traceIndex+1)*stride]; + *nextValue = ptr[(traceIndex+1)*stride + valueColumnIndex]; + *nextColor = (colorColumnIndex >= 0 && self->n > colorColumnIndex) ? ptr[(traceIndex+1)*stride + colorColumnIndex] : 0.0; + *nextThickness = (thicknessColorIndex >= 0 && self->n > thicknessColorIndex) ? ptr[(traceIndex+1)*stride + thicknessColorIndex] : 0.0; + *nextOpacity = (opacityColorIndex >= 0 && self->n > opacityColorIndex) ? ptr[(traceIndex+1)*stride + opacityColorIndex] : 0.0; } else { @@ -3386,6 +3433,7 @@ *nextValue = *value; *nextColor = *color; *nextThickness = *thickness; + *nextOpacity = *opacity; } fmat_unlock(self); return 1; @@ -3396,10 +3444,12 @@ *value = 0.0; *color = 0.0; *thickness = 0.0; + *opacity = 1.0; *next_time = -1.0; - *nextValue = 0; - *nextColor = 0; - *nextThickness = 0; + *nextValue = 0.0; + *nextColor = 0.0; + *nextThickness = 0.0; + *nextOpacity = 1.0; return 0; } } @@ -3428,10 +3478,10 @@ } } -static void +static void fmat_gui_traces_set_trace(void *obj, void *context, int index, - int valueColumnIndex, int colorColumnIndex, int thicknessColorIndex, - double time, double value, double color, double thickness) + int valueColumnIndex, int colorColumnIndex, int thicknessColorIndex, int opacityColumnIndex, + double time, double value, double color, double thickness, double opacity) { fmat_t *self = (fmat_t *)obj; @@ -3445,6 +3495,7 @@ ptr[index*stride + valueColumnIndex] = value; if(colorColumnIndex > 0 && self->n > colorColumnIndex) ptr[index*stride + colorColumnIndex] = color; if(thicknessColorIndex > 0 && self->n > thicknessColorIndex) ptr[index*stride + thicknessColorIndex] = thickness; + if(opacityColumnIndex > 0 && self->n > opacityColumnIndex) ptr[index*stride + opacityColumnIndex] = opacity; fmat_unlock(self); } @@ -3463,6 +3514,67 @@ } static void +fmat_gui_traces_get_min_max_in_range_for_trace(void * obj, void *context, int traceIndex, int startIndex, int rangeSize, int valueColumn, int colorColumn, int thicknessColumn, int opacityColumn, double *minValue, double *maxValue, double *meanValue, double *meanColor, double *meanOpacity) +{ + fmat_t *self = (fmat_t *)obj; + + int trace_mxrows = 0; + int index = startIndex; + double value = 0.0; + double thickness = 0.0; + double color = 0.0; + double opacity = 1.0; + double min = (rangeSize > 0) ? FLT_MAX : 0.0; + double max = (rangeSize > 0) ? FLT_MIN : 0.0; + double mean = 0.0; + double meanCol = 0.0; + double meanOpac = 0.0; + double tempValue = 0.0f; + double tempColor = 0.0f; + double tempOpacity = 0.0f; + + if(rangeSize > 0) + { + float *ptr = fmat_lock(self); + int stride = fmat_get_n(self); + trace_mxrows = fmat_get_m(self); + int valueColumnIndex = valueColumn; + if(valueColumnIndex < 0) valueColumnIndex = 0; + if(traceIndex < trace_mxrows) + { + for(int i = 0; i < rangeSize; i++) + { + index+=i; + + value = ptr[(i)*stride + valueColumnIndex]; + if(thicknessColumn >= 0 && thicknessColumn < stride) + thickness = ptr[(i)*stride + thicknessColumn]; + if(colorColumn >= 0 && colorColumn < stride) + color = ptr[(i)*stride + colorColumn]; + if(opacityColumn >= 0 && opacityColumn < stride) + opacity = ptr[(i)*stride + opacityColumn]; + + if(value + thickness/2 > max) max = value + thickness/2; + if(value - thickness/2 < min) min = value - thickness/2; + tempValue += value; + tempColor += color; + tempOpacity += opacity; + } + } + mean = tempValue/rangeSize; + meanCol = tempColor/rangeSize; + meanOpac = tempOpacity/rangeSize; + } + if(min > max) + { + min = 0.0; + max = 0.0; + } + *minValue = min; *maxValue = max; + *meanValue = mean; *meanColor = meanCol; *meanOpacity = meanOpac; +} + +static void fmat_gui_traces_install(void) { static imtr_guiInterfaceTraces fmat_gui_interface_traces; @@ -3510,9 +3622,10 @@ fmat_gui_interface_traces.setTraceValues = NULL; fmat_gui_interface_traces.clearHashtable = fmat_gui_interface_traces_clear_hashtable; fmat_gui_interface_traces.releaseHashtable = fmat_gui_interface_traces_release_hashtable; + fmat_gui_interface_traces.getMinMaxInRangeForTrace = fmat_gui_traces_get_min_max_in_range_for_trace; fts_class_instantiate(fmat_class); - fts_class_gui_interface(fmat_class, fts_s_traces, &fmat_gui_interface_traces); + fts_class_gui_interface(fmat_class, fts_s_traces, &fmat_gui_interface_traces); } #pragma mark Fmat: Pixels interface @@ -4237,6 +4350,18 @@ return 0; } +static int +fmat_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *colname) +{ + fmat_t *self = (fmat_t *) obj; + fts_schema_t *colschema = fmat_get_schema(self, 2); + int colIndex = -1; + if(colschema != NULL) + colIndex = fts_schema_get_index(colschema, fts_new_symbol(colname)); + + return colIndex; +} + static void fmat_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -4310,11 +4435,11 @@ fmat_gui_interface_matrix.getObject = fmat_gui_matrix_get_object; fmat_gui_interface_matrix.releaseObject = fmat_gui_matrix_release_object; fmat_gui_interface_matrix.getColumnName = fmat_gui_matrix_get_column_name; + fmat_gui_interface_matrix.getColumnIndexByName = fmat_gui_matrix_get_column_index_by_name; fmat_gui_interface_matrix.getToolbarConfig = fmat_gui_matrix_get_toolbar_config; fmat_gui_interface_matrix.insertRow = fmat_gui_matrix_insert_row; fmat_gui_interface_matrix.removeRow = fmat_gui_matrix_remove_row; - fts_class_instantiate(fmat_class); fts_class_gui_interface(fmat_class, fts_s_matrix, &fmat_gui_interface_matrix); } @@ -4702,6 +4827,12 @@ return 0; } +static int +fvec_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *name) +{ + return 0; +} + static void fvec_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -4745,6 +4876,7 @@ fvec_gui_interface_matrix.getObject = fvec_gui_matrix_get_object; fvec_gui_interface_matrix.releaseObject = fvec_gui_matrix_release_object; fvec_gui_interface_matrix.getColumnName = fvec_gui_matrix_get_column_name; + fvec_gui_interface_matrix.getColumnIndexByName = fvec_gui_matrix_get_column_index_by_name; fvec_gui_interface_matrix.getToolbarConfig = fvec_gui_matrix_get_toolbar_config; fvec_gui_interface_matrix.insertRow = NULL; fvec_gui_interface_matrix.removeRow = NULL; @@ -6595,6 +6727,37 @@ return fts_symbol_name(fts_s_empty_string); } +static int +sequence_gui_matrix_get_column_index_by_name(void *obj, void *context, const char *name) +{ + fts_symbol_t colName = fts_new_symbol(name); + int colIndex = -1; + if(colName == fts_s_time) + colIndex = 0; + else + { + if(sequence_get_type((sequence_t *)obj) == scoob_class) + { + if(colName == fts_s_pitch) + colIndex = 1; + else if(colName == fts_s_duration) + colIndex = 2; + } + else if(track_get_type((track_t *)obj) == marker_class) + { + if(colName == fts_s_cue) + colIndex = 1; + else if(colName == fts_s_label) + colIndex = 2; + else if(colName == fts_s_duration) + colIndex = 3; + else if(colName == fts_s_offset) + colIndex = 4; + } + } + return colIndex; +} + static void sequence_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -6720,6 +6883,7 @@ sequence_gui_interface_matrix.getObject = sequence_gui_matrix_get_object; sequence_gui_interface_matrix.releaseObject = sequence_gui_matrix_release_object; sequence_gui_interface_matrix.getColumnName = sequence_gui_matrix_get_column_name; + sequence_gui_interface_matrix.getColumnIndexByName = sequence_gui_matrix_get_column_index_by_name; sequence_gui_interface_matrix.getToolbarConfig = sequence_gui_matrix_get_toolbar_config; sequence_gui_interface_matrix.insertRow = sequence_gui_matrix_insert_row; sequence_gui_interface_matrix.removeRow = sequence_gui_matrix_remove_row; @@ -7329,13 +7493,14 @@ return maxNumParams; } -static void -sequence_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, - int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, void **readHash, void **writeHash) +static void +sequence_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, const char *opacityColName, + int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, int *opacityColIndex, void **readHash, void **writeHash) { *valueColIndex = 0; *colorColIndex = 1; *thicknessColIndex = 2; + *opacityColIndex = 3; } static void @@ -7445,8 +7610,10 @@ return (void *)evt; } +typedef void (*imtr_gui_interface_traces_get_trace_values_t)(void *obj, void *context, void *trace_event, int valueIndex, double *time, double *value, double *color, double *thickness, double *opacity); + static void -sequence_gui_traces_get_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double *time, double *value, double *color, double *thickness) +sequence_gui_traces_get_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double *time, double *value, double *color, double *thickness, double *opacity) { sequence_t *sequence = (sequence_t *)obj; @@ -7461,12 +7628,14 @@ *value = (fmat->n > 0) ? fmat_get_element(fmat, valueIndex, 0) : 0.0; *color = (fmat->n > 1) ? fmat_get_element(fmat, valueIndex, 1) : 0.0; *thickness = (fmat->n > 2) ? fmat_get_element(fmat, valueIndex, 2) : 0.0; + *opacity = (fmat->n > 3) ? fmat_get_element(fmat, valueIndex, 3) : 1.0; } else { *value = 0.0; *color = 0.0; - *thickness = 0.0; + *thickness = 0.0; + *opacity = 1.0; } } else @@ -7475,12 +7644,13 @@ *value = 0.0; *color = 0.0; *thickness = 0.0; + *opacity = 1.0; } sequence_unlock(sequence); } static void -sequence_gui_traces_set_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double time, double value, double color, double thickness) +sequence_gui_traces_set_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double time, double value, double color, double thickness, double opacity) { sequence_t *sequence = (sequence_t *)obj; @@ -7496,6 +7666,7 @@ if(fmat->n > 0) fmat_set_element(fmat, valueIndex, 0, value); if(fmat->n > 1) fmat_set_element(fmat, valueIndex, 1, color); if(fmat->n > 2) fmat_set_element(fmat, valueIndex, 2, thickness); + if(fmat->n > 3) fmat_set_element(fmat, valueIndex, 3, opacity); } } sequence_unlock(sequence); @@ -7502,6 +7673,78 @@ } static void +sequence_gui_traces_get_mean_by_column(void *obj, void *context, double *mean, int columnIndex) +{ + sequence_t *sequence = (sequence_t *)obj; + + int tempMean = 0.0; + + sequence_lock_read(sequence); + + if(sequence_get_type(sequence) == fmat_class) + { + fmat_t *trace = NULL; + event_t *evt = sequence_get_first(sequence); + float value; + int numValues = 0; + int sum = 0; + + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + while(evt != NULL) + { + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + if(trace != NULL && trace->n > columnIndex) + { + value = fmat_get_element(trace, 0, columnIndex); + sum += value; + numValues++; + } + evt = event_get_next(evt); + } + if(numValues > 0) + tempMean = sum/numValues; + } + sequence_unlock(sequence); + + *mean = tempMean; +} + +static void +sequence_gui_traces_get_min_max_in_range_for_trace(void * obj, void *context, int traceIndex, int startIndex, int rangeSize, int valueColumn, int colorColumn, int thicknessColumn, int opacityColumn, double *minValue, double *maxValue, double *meanValue, double *meanColor, double *meanOpacity) +{ + sequence_t *sequence = (sequence_t *)obj; + + sequence_lock_read(sequence); + + double min = (rangeSize > 0) ? FLT_MAX : 0.0; + double max = (rangeSize > 0) ? FLT_MIN : 0.0; + double mean = 0.0; + double meanCol = 0.0; + double meanOpac = 0.0; + + if(rangeSize > 0) + { + int valueColumnIndex = valueColumn; + if(valueColumnIndex < 0) valueColumnIndex = 0; + sequence_gui_traces_get_value_range(obj, context, valueColumnIndex, thicknessColumn, startIndex, rangeSize, minValue, maxValue); + sequence_gui_traces_get_mean_by_column(obj, context, &mean, valueColumnIndex); + sequence_gui_traces_get_mean_by_column(obj, context, &meanCol, colorColumn); + sequence_gui_traces_get_mean_by_column(obj, context, &meanOpac, opacityColumn); + } + + sequence_unlock(sequence); + if(min > max) + { + min = 0.0; + max = 0.0; + } + *minValue = min; *maxValue = max; + *meanValue = mean; *meanColor = meanCol; *meanOpacity = meanOpac; +} + +static void sequence_gui_traces_install(void) { static imtr_guiInterfaceTraces sequence_gui_interface_traces; @@ -7549,6 +7792,7 @@ sequence_gui_interface_traces.setTraceValues = sequence_gui_traces_set_trace_values; sequence_gui_interface_traces.clearHashtable = NULL; sequence_gui_interface_traces.releaseHashtable = NULL; + sequence_gui_interface_traces.getMinMaxInRangeForTrace = sequence_gui_traces_get_min_max_in_range_for_trace; fts_class_instantiate(sequence_class); fts_class_gui_interface(sequence_class, fts_s_traces, &sequence_gui_interface_traces); @@ -8362,8 +8606,8 @@ trace = (fmat_t *)fts_get_object(event_get_value(evt)); if(trace != NULL && trace->n > 2) { - thick_min = (trace->n > 1) ? fmat_get_element(trace, 0, 2) : 0.0; - thick_max = (trace->n > 1) ? fmat_get_element(trace, 0, 2) : 1.0; + thick_min = (trace->n > 2) ? fmat_get_element(trace, 0, 2) : 0.0; + thick_max = (trace->n > 2) ? fmat_get_element(trace, 0, 2) : 1.0; } while(evt != NULL) { @@ -8384,10 +8628,49 @@ *max = thick_max; } -static void -track_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, - int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, void **readHash, void **writeHash) +static void +track_gui_traces_get_opacity_range(void *obj, void *context, int opacityColumnIndex, double *min, double *max) { + sequence_t *sequence = track_get_events((track_t *)obj); + float op_min = 0.0; + float op_max = 1.0; + + sequence_lock_read(sequence); + + if(sequence_get_type(sequence) == fmat_class) + { + fmat_t *trace = NULL; + event_t *evt = sequence_get_first(sequence); + float opacity; + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + if(trace != NULL && trace->n > 2) + { + op_min = (trace->n > 3) ? fmat_get_element(trace, 0, 3) : 0.0; + op_max = (trace->n > 3) ? fmat_get_element(trace, 0, 3) : 1.0; + } + while(evt != NULL) + { + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + if(trace != NULL && trace->n > 2) + { + opacity = fmat_get_element(trace, 0, 3); + if(opacity < op_min) op_min = opacity; + if(opacity > op_max) op_max = opacity; + } + evt = event_get_next(evt); + } + } + sequence_unlock(sequence); + + *min = op_min; + *max = op_max; +} +static void +track_gui_traces_get_column_indexes(void *obj, void *context, const char *valueColName, const char *colorColName, const char *thicknessColName, const char *opacityColName, + int *valueColIndex, int *colorColIndex, int *thicknessColIndex, int *indexColIndex, int *opacityColIndex, void **readHash, void **writeHash) +{ *valueColIndex = 0; *colorColIndex = 1; *thicknessColIndex = 2; @@ -8413,6 +8696,10 @@ case 2: track_gui_traces_get_thickness_range(obj, context, 2, min, max); break; + + case 3: + track_gui_traces_get_opacity_range(obj, context, 3, min, max); + break; } } @@ -8511,8 +8798,10 @@ return (void *)evt; } +typedef void (*imtr_gui_interface_traces_get_trace_values_t)(void *obj, void *context, void *trace_event, int valueIndex, double *time, double *value, double *color, double *thickness, double *opacity); + static void -track_gui_traces_get_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double *time, double *value, double *color, double *thickness) +track_gui_traces_get_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double *time, double *value, double *color, double *thickness, double *opacity) { sequence_t *sequence = track_get_events((track_t *)obj); @@ -8527,12 +8816,14 @@ *value = (fmat->n > 0) ? fmat_get_element(fmat, valueIndex, 0) : 0.0; *color = (fmat->n > 1) ? fmat_get_element(fmat, valueIndex, 1) : 0.0; *thickness = (fmat->n > 2) ? fmat_get_element(fmat, valueIndex, 2) : 0.0; + *opacity = (fmat->n > 3) ? fmat_get_element(fmat, valueIndex, 3) : 1.0; } else { *value = 0.0; *color = 0.0; - *thickness = 0.0; + *thickness = 0.0; + *opacity = 1.0; } } else @@ -8541,12 +8832,13 @@ *value = 0.0; *color = 0.0; *thickness = 0.0; + *opacity = 1.0; } sequence_unlock(sequence); } static void -track_gui_traces_set_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double time, double value, double color, double thickness) +track_gui_traces_set_trace_values(void *obj, void *context, void *trace_evt, int valueIndex, double time, double value, double color, double thickness, double opacity) { sequence_t *sequence = track_get_events((track_t *)obj); @@ -8563,6 +8855,7 @@ if(fmat->n > 0) fmat_set_element(fmat, valueIndex, 0, value); if(fmat->n > 1) fmat_set_element(fmat, valueIndex, 1, color); if(fmat->n > 2) fmat_set_element(fmat, valueIndex, 2, thickness); + if(fmat->n > 3) fmat_set_element(fmat, valueIndex, 3, opacity); } } sequence_unlock(sequence); @@ -8569,6 +8862,79 @@ } static void +track_gui_traces_get_mean_by_column(void *obj, void *context, double *mean, int columnIndex) +{ + sequence_t *sequence = track_get_events((track_t *)obj); + + int tempMean = 0.0; + + sequence_lock_read(sequence); + + if(sequence_get_type(sequence) == fmat_class) + { + fmat_t *trace = NULL; + event_t *evt = sequence_get_first(sequence); + float value; + int numValues = 0; + int sum = 0; + + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + while(evt != NULL) + { + if(evt != NULL && event_get_value(evt) != NULL) + trace = (fmat_t *)fts_get_object(event_get_value(evt)); + if(trace != NULL && trace->n > columnIndex) + { + value = fmat_get_element(trace, 0, columnIndex); + sum += value; + numValues++; + } + evt = event_get_next(evt); + } + if(numValues > 0) + tempMean = sum/numValues; + } + sequence_unlock(sequence); + + *mean = tempMean; +} + +static void +track_gui_traces_get_min_max_in_range_for_trace(void * obj, void *context, int traceIndex, int startIndex, int rangeSize, int valueColumn, int colorColumn, int thicknessColumn, int opacityColumn, double *minValue, double *maxValue, double *meanValue, double *meanColor, double *meanOpacity) +{ + sequence_t *sequence = track_get_events((track_t *)obj); + + sequence_lock_read(sequence); + + double min = (rangeSize > 0) ? FLT_MAX : 0.0; + double max = (rangeSize > 0) ? FLT_MIN : 0.0; + double mean = 0.0; + double meanCol = 0.0; + double meanOpac = 0.0; + + if(rangeSize > 0) + { + int valueColumnIndex = valueColumn; + if(valueColumnIndex < 0) valueColumnIndex = 0; + track_gui_traces_get_value_range(obj, context, valueColumnIndex, thicknessColumn, startIndex, rangeSize, minValue, maxValue); + track_gui_traces_get_mean_by_column(obj, context, &mean, valueColumnIndex); + track_gui_traces_get_mean_by_column(obj, context, &meanCol, colorColumn); + track_gui_traces_get_mean_by_column(obj, context, &meanOpac, opacityColumn); + } + + sequence_unlock(sequence); + + if(min > max) + { + min = 0.0; + max = 0.0; + } + *minValue = min; *maxValue = max; + *meanValue = mean; *meanColor = meanCol; *meanOpacity = meanOpac; +} + +static void track_gui_traces_install(void) { static imtr_guiInterfaceTraces track_gui_interface_traces; @@ -8614,6 +8980,7 @@ track_gui_interface_traces.setTraceValues = track_gui_traces_set_trace_values; track_gui_interface_traces.clearHashtable = NULL; track_gui_interface_traces.releaseHashtable = NULL; + track_gui_interface_traces.getMinMaxInRangeForTrace = track_gui_traces_get_min_max_in_range_for_trace; fts_class_instantiate(track_class); fts_class_gui_interface(track_class, fts_s_traces, &track_gui_interface_traces); @@ -10124,6 +10491,38 @@ return fts_symbol_name(fts_s_empty_string); } +static int +track_gui_matrix_get_column_index_by_name(void *obj, void *context, const char * name) +{ + fts_symbol_t colName = fts_new_symbol(name); + int colIndex = -1; + + if(colName == fts_s_time) + colIndex = 0; + else + { + if(track_get_type((track_t *)obj) == scoob_class) + { + if(colName == fts_s_pitch) + colIndex = 1; + else if(colName == fts_s_duration) + colIndex = 2; + } + else if(track_get_type((track_t *)obj) == marker_class) + { + if(colName == fts_s_cue) + colIndex = 1; + else if(colName == fts_s_label) + colIndex = 2; + else if(colName == fts_s_duration) + colIndex = 3; + else if(colName == fts_s_offset) + colIndex = 4; + } + } + return colIndex; +} + static void track_gui_matrix_get_toolbar_config(void *obj, void *context, int *hasToolbar, int *appendOnly) { @@ -10249,6 +10648,7 @@ track_gui_interface_matrix.getObject = track_gui_matrix_get_object; track_gui_interface_matrix.releaseObject = track_gui_matrix_release_object; track_gui_interface_matrix.getColumnName = track_gui_matrix_get_column_name; + track_gui_interface_matrix.getColumnIndexByName = track_gui_matrix_get_column_index_by_name; track_gui_interface_matrix.getToolbarConfig = track_gui_matrix_get_toolbar_config; track_gui_interface_matrix.insertRow = track_gui_matrix_insert_row; track_gui_interface_matrix.removeRow = track_gui_matrix_remove_row; @@ -10667,13 +11067,14 @@ } } -static void -fmat_gui_scatterplot_append_point(void *obj, void *context, double posx, double posy, int xColumnIndex, int yColumnIndex) +static int +fmat_gui_scatterplot_append_point(void *obj, void *context, double posx, double posy, int xColumnIndex, int yColumnIndex, int widthIndex, int heightIndex, int angleColumnIndex, int edgeColorColumnIndex, int fillColorColumnIndex) { fmat_t *self = (fmat_t *)obj; fts_atom_t a; int size = self->m + 1; int i; + int retIndex = -1; fmat_lock_capacity(self, size * self->n); fmat_insert_rows_nogrow(self, size-1, 1); @@ -10685,13 +11086,16 @@ fts_set_symbol(&a, fts_s_add); fts_object_changed_with_arguments((fts_object_t *)self, 1, &a); + + retIndex = self->m-1; + return retIndex; } static void -fmat_gui_scatterplot_get_minmax_by_column(void *obj, void *context, int optionalViewIndex, double *min, double *max, int columnIndex) +fmat_gui_scatterplot_get_minmaxmean_by_column(void *obj, void *context, int optionalViewIndex, double *min, double *max, double *mean, int columnIndex) { fmat_t *self = (fmat_t *)obj; - float val, v_min, v_max; + float val, v_min, v_max, v_mean; int i; if(columnIndex >= 0 && columnIndex < self->n) @@ -10698,10 +11102,11 @@ { float *ptr = fmat_lock(self); int stride = fmat_get_n(self); - - v_min = ptr[columnIndex]; - v_max = ptr[columnIndex]; - + int num = 0; + val = ptr[columnIndex]; + v_min = val; + v_max = val; + v_mean = 0.0; for(i = 0; i < self->m; i ++) { val = ptr[(i)*stride + columnIndex]; @@ -10709,6 +11114,8 @@ { if(val < v_min) v_min = val; if(val > v_max) v_max = val; + v_mean += val; + num++; } } fmat_unlock(self); @@ -10715,6 +11122,7 @@ *min = v_min; *max = v_max; + *mean = (num > 0) ? v_mean/num : 0.0; } } @@ -10815,8 +11223,10 @@ fmat_gui_interface_scatterplot.getConnectionsColumnIndexes = NULL; fmat_gui_interface_scatterplot.getPoint = fmat_gui_scatterplot_get_point; fmat_gui_interface_scatterplot.getPointColors = fmat_gui_scatterplot_get_point_colors; - fmat_gui_interface_scatterplot.getNumConnections = fmat_gui_scatterplot_get_num_connections; - fmat_gui_interface_scatterplot.getConnection = NULL; + fmat_gui_interface_scatterplot.getNumOutConnections = fmat_gui_scatterplot_get_num_connections; + fmat_gui_interface_scatterplot.getNumInConnections = fmat_gui_scatterplot_get_num_connections; + fmat_gui_interface_scatterplot.getOutConnection = NULL; + fmat_gui_interface_scatterplot.getInConnection = NULL; fmat_gui_interface_scatterplot.getLabel = fmat_gui_scatterplot_get_label; fmat_gui_interface_scatterplot.removePoints = fmat_gui_scatterplot_remove_points; fmat_gui_interface_scatterplot.removePoint = fmat_gui_scatterplot_remove_point; @@ -10824,7 +11234,7 @@ fmat_gui_interface_scatterplot.setPointPosition = fmat_gui_scatterplot_set_point_position; fmat_gui_interface_scatterplot.setPointValue = fmat_gui_scatterplot_set_point_value; fmat_gui_interface_scatterplot.appendPoint = fmat_gui_scatterplot_append_point; - fmat_gui_interface_scatterplot.getMinMaxByColumn = fmat_gui_scatterplot_get_minmax_by_column; + fmat_gui_interface_scatterplot.getMinMaxMeanByColumn = fmat_gui_scatterplot_get_minmaxmean_by_column; fmat_gui_interface_scatterplot.getMinMaxPosition = fmat_gui_scatterplot_get_minmax_position; fmat_gui_interface_scatterplot.addConnection = NULL; fmat_gui_interface_scatterplot.getConnectionTrackIndex = NULL; @@ -11157,13 +11567,14 @@ } } -static void -mat_gui_scatterplot_append_point(void *obj, void *context, double posx, double posy, int xColumnIndex, int yColumnIndex) +static int +mat_gui_scatterplot_append_point(void *obj, void *context, double posx, double posy, int xColumnIndex, int yColumnIndex, int widthIndex, int heightIndex, int angleColumnIndex, int edgeColorColumnIndex, int fillColorColumnIndex) { mat_t *self = (mat_t *)obj; fts_atom_t a, b, c; int size = self->m + 1; int i; + int retIndex = -1; fts_set_int(&a, -1); fts_set_int(&b, posx); @@ -11179,18 +11590,22 @@ fts_set_symbol(&a, fts_s_add); fts_object_changed_with_arguments((fts_object_t *)self, 1, &a); + + retIndex = self->m-1; + return retIndex; } static void -mat_gui_scatterplot_get_minmax_by_column(void *obj, void *context, int optionalViewIndex, double *min, double *max, int columnIndex) +mat_gui_scatterplot_get_minmaxmean_by_column(void *obj, void *context, int optionalViewIndex, double *min, double *max, double *mean, int columnIndex) { mat_t *self = (mat_t *)obj; - float value, v_min, v_max; + float value, v_min, v_max, v_mean; int i; if(columnIndex >= 0 && columnIndex < self->n) { fts_atom_t *val; + v_mean = 0; mat_lock(self); @@ -11197,10 +11612,13 @@ val = mat_get_element(self, 0, columnIndex); if(fts_is_number(val)) { - v_min = fts_get_number_float(val); - v_max = v_min; + value = fts_get_number_float(val); + v_min = value; + v_max = value; + v_mean += value; } + int num = 0; for(i = 0; i < self->m; i ++) { val = mat_get_element(self, i, columnIndex); @@ -11209,6 +11627,7 @@ value = fts_get_number_float(val); if(value < v_min) v_min = value; if(value > v_max) v_max = value; + v_mean += value; } } mat_unlock(self); @@ -11215,6 +11634,7 @@ *min = v_min; *max = v_max; + *mean = (num > 0) ? v_mean/num : 0.0; } } @@ -11342,8 +11762,10 @@ mat_gui_interface_scatterplot.getConnectionsColumnIndexes = NULL; mat_gui_interface_scatterplot.getPoint = mat_gui_scatterplot_get_point; mat_gui_interface_scatterplot.getPointColors = mat_gui_scatterplot_get_point_colors; - mat_gui_interface_scatterplot.getNumConnections = mat_gui_scatterplot_get_num_connections; - mat_gui_interface_scatterplot.getConnection = NULL; + mat_gui_interface_scatterplot.getNumOutConnections = mat_gui_scatterplot_get_num_connections; + mat_gui_interface_scatterplot.getNumInConnections = mat_gui_scatterplot_get_num_connections; + mat_gui_interface_scatterplot.getOutConnection = NULL; + mat_gui_interface_scatterplot.getInConnection = NULL; mat_gui_interface_scatterplot.getLabel = mat_gui_scatterplot_get_label; mat_gui_interface_scatterplot.removePoints = mat_gui_scatterplot_remove_points; mat_gui_interface_scatterplot.removePoint = mat_gui_scatterplot_remove_point; @@ -11351,7 +11773,7 @@ mat_gui_interface_scatterplot.setPointPosition = mat_gui_scatterplot_set_point_position; mat_gui_interface_scatterplot.setPointValue = mat_gui_scatterplot_set_point_value; mat_gui_interface_scatterplot.appendPoint = mat_gui_scatterplot_append_point; - mat_gui_interface_scatterplot.getMinMaxByColumn = mat_gui_scatterplot_get_minmax_by_column; + mat_gui_interface_scatterplot.getMinMaxMeanByColumn = mat_gui_scatterplot_get_minmaxmean_by_column; mat_gui_interface_scatterplot.getMinMaxPosition = mat_gui_scatterplot_get_minmax_position; mat_gui_interface_scatterplot.addConnection = NULL; mat_gui_interface_scatterplot.getConnectionTrackIndex = NULL; Modified: trunk/ftm/ftmlib/predefsymbols.h =================================================================== --- trunk/ftm/ftmlib/predefsymbols.h 2025-06-10 13:49:03 UTC (rev 3807) +++ trunk/ftm/ftmlib/predefsymbols.h 2025-06-10 13:49:56 UTC (rev 3808) @@ -305,6 +305,7 @@ PREDEF_SYMBOL( fts_s_autobounds, "autobounds"); PREDEF_SYMBOL( fts_s_autoupdate, "autoupdate"); PREDEF_SYMBOL( fts_s_bgcolor, "bgcolor"); +PREDEF_SYMBOL( fts_s_bgcolor_is_default, "bgcolor_is_default"); PREDEF_SYMBOL( fts_s_bold, "bold"); PREDEF_SYMBOL( fts_s_bordercolor, "bordercolor"); PREDEF_SYMBOL( fts_s_bottom, "bottom"); @@ -311,6 +312,7 @@ PREDEF_SYMBOL( fts_s_bounds, "bounds"); PREDEF_SYMBOL( fts_s_center, "center"); PREDEF_SYMBOL( fts_s_colormode, "colormode"); +PREDEF_SYMBOL( fts_s_color_is_default, "color_is_default"); PREDEF_SYMBOL( fts_s_colorpattern, "colorpattern"); PREDEF_SYMBOL( fts_s_content, "content"); PREDEF_SYMBOL( fts_s_current, "current"); @@ -328,6 +330,7 @@ PREDEF_SYMBOL( fts_s_drawnames, "drawnames"); PREDEF_SYMBOL( fts_s_edit, "edit"); PREDEF_SYMBOL( fts_s_fgcolor, "fgcolor"); +PREDEF_SYMBOL( fts_s_fgcolor_is_default, "fgcolor_is_default"); PREDEF_SYMBOL( fts_s_fgcolorgradient, "fgcolorgradient"); PREDEF_SYMBOL( fts_s_followmouse, "followmouse"); PREDEF_SYMBOL( fts_s_fontsize, "fontsize"); @@ -376,6 +379,7 @@ PREDEF_SYMBOL( fts_s_region, "region"); PREDEF_SYMBOL( fts_s_replace, "replace"); PREDEF_SYMBOL( fts_s_retractable, "retractable"); +PREDEF_SYMBOL( fts_s_rowsize, "rowsize"); PREDEF_SYMBOL( fts_s_ruler, "ruler"); PREDEF_SYMBOL( fts_s_scatterplot, "scatterplot"); PREDEF_SYMBOL( fts_s_score, "score"); @@ -411,6 +415,7 @@ PREDEF_SYMBOL( fts_s_vertical, "vertical"); PREDEF_SYMBOL( fts_s_visible, "visible"); PREDEF_SYMBOL( fts_s_visibleindexes, "visibleindexes"); +PREDEF_SYMBOL( fts_s_visibleindices, "visibleindices"); PREDEF_SYMBOL( fts_s_zeropeaks, "zeropeaks"); PREDEF_SYMBOL( fts_s_wave, "wave") @@ -435,6 +440,8 @@ PREDEF_SYMBOL( fts_s_view, "view"); PREDEF_SYMBOL( fts_s_rangemode, "rangemode"); PREDEF_SYMBOL( fts_s_columns, "columns"); +PREDEF_SYMBOL( fts_s_columnsize, "columnsize"); +PREDEF_SYMBOL( fts_s_columnsizes, "columnsizes"); PREDEF_SYMBOL( fts_s_table_size, "tableSize"); PREDEF_SYMBOL( fts_s_grid_mode, "grid_mode"); PREDEF_SYMBOL( fts_s_events, "events"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2025-06-10 13:49:08
|
Revision: 3807 http://sourceforge.net/p/ftm/code/3807 Author: borghesi Date: 2025-06-10 13:49:03 +0000 (Tue, 10 Jun 2025) Log Message: ----------- update of ftm.editor to current version of ImtrEditor; update of gui objects to scheme colors Modified Paths: -------------- trunk/ftm/externals/max5/ftm.editor.cpp trunk/ftm/externals/max5/ftm.mess.c trunk/ftm/externals/max5/ftm.object.c Modified: trunk/ftm/externals/max5/ftm.editor.cpp =================================================================== --- trunk/ftm/externals/max5/ftm.editor.cpp 2025-06-10 13:47:11 UTC (rev 3806) +++ trunk/ftm/externals/max5/ftm.editor.cpp 2025-06-10 13:49:03 UTC (rev 3807) @@ -92,9 +92,14 @@ long orientation; t_jrgba back_color; + t_jrgba default_back_color; + t_jrgba default_fore_color; + long bgcolor_is_default; + long domainScrollbar_visible; long domainScrollbar_size; t_jrgba domainScrollbar_color; + long domainscrollbar_color_is_default; t_jrgba region_color; float region_begin; @@ -107,16 +112,20 @@ long domainruler_unit; t_jrgba domainruler_bgcolor; t_jrgba domainruler_fgcolor; + long domainruler_fgcolor_is_default; + long domainruler_bgcolor_is_default; long toolbar_visible; long toolbar_size; long toolbar_position; t_jrgba toolbar_bgcolor; + long toolbar_bgcolor_is_default; long tabs_visible; long tabs_size; long tabs_position; t_jrgba tabs_color; + bool tabs_color_is_default; long rangeruler_visible; long rangeruler_size; @@ -154,6 +163,8 @@ void *qelem_ftmeditor_repaint; void *qelem_ftmeditor_refresh; + int loadingAttributes; + t_jsurface *ftmeditor_offscreen; IMTREDITOR_JUCE_NAMESPACE::Image ftmeditorSnapshot; t_critical critical_off; @@ -171,6 +182,19 @@ static void ftmeditor_repaint(ftmeditor_t *self); static void ftmeditor_outlet_message_deferred(ftmeditor_t *self, fts_symbol_t s, short ac, t_atom *at); static void ftmeditor_set_all_objects_changed(ftmeditor_t *self); +static void ftmeditor_set_bgcolor_by_rgb(ftmeditor_t *self, double r, double g, double b, float alpha, bool fromTheme, bool isDefault); +static void ftmeditor_set_fgcolor_to_default(ftmeditor_t *self); +static bool ftmeditor_bgcolor_is_default(ftmeditor_t *self); +static void ftmeditor_reinit_bgcolor_to_default(ftmeditor_t *self); +static void ftmeditor_set_tabs_color_to_default(ftmeditor_t *self, bool setToComponents); +static void ftmeditor_set_tabs_color_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault); +static void ftmeditor_set_domainscrollbar_color_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault); +static void ftmeditor_set_domainruler_bgcolor_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault); +static void ftmeditor_set_toolbar_bgcolor_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault); +static void ftmeditor_set_bgcolordefault(ftmeditor_t *self, int isdefault); +static void ftmeditor_init_default_global_attrs(ftmeditor_t *self, bool setToComponents); +void ftmeditor_update_default_bgcolor(ftmeditor_t *self, bool setToContainer); + //============================================================================== class ImtrEditorContainer : public IMTREDITOR_JUCE_NAMESPACE::Component, public ImtrEditorListener { @@ -190,7 +214,7 @@ addAndMakeVisible(editorContainer = new EditorContainer(this)); editorContainer->setBoundsRelative(0.0f, 0.0f, 1.0f, 1.0f); - autoupdate = true; + autoupdate = true; } ~ImtrEditorContainer() @@ -197,6 +221,108 @@ { } + void setDefaultEditorConfig() + { + if(editorContainer != NULL) + { + IMTREDITOR_JUCE_NAMESPACE::Array <float> juxtSizes; + + setForemost(0); + + editorContainer->setViewDefaultConfig(-1); + + editorContainer->setMainTrack(-1, IMTREDITOR_JUCE_NAMESPACE::String()); + editorContainer->setOutputChangedValues(0); + editorContainer->setOutputMousePosition(0); + editorContainer->setOutputKeys(0); + editorContainer->setOutputSelection(0); + editorContainer->setOutputTimeSelection(0); + editorContainer->setUsePlaceholders(true); + editorContainer->setOpacity(0.0f); + editorContainer->setOpacityProgressive(0); + editorContainer->setLayout(ImtrTypes::superposed, juxtSizes); + editorContainer->setOrientation(ImtrTypes::horizontal); + + // domainscrollbar + editorContainer->setDomainScrollbarVisible(true); + editorContainer->setDomainScrollbarSize(ImtrTypes::DOMAINSCROLLBAR_DEFAULT_SIZE); + //editorContainer->setDomainScrollbarColor(false, IMTREDITOR_JUCE_NAMESPACE::Colours::white); + setDomainScrollbarProperty(gensym("color"), true); + + // region + editorContainer->setRegionSelectionColor(false, IMTREDITOR_JUCE_NAMESPACE::Colour(external->region_color.red * 255.0, + external->region_color.green * 255.0, + external->region_color.blue * 255.0).withAlpha((float)external->region_color.alpha)); + editorContainer->setRegionSelectionVisible(true); + editorContainer->deselectRegion(); + + // domain + editorContainer->alignEditors(false); + editorContainer->setDefaultZoom(false); + editorContainer->refreshDomainScrollbar(); + + // cursor + editorContainer->moveCursor(-1.0f, 0.0f, 1); + editorContainer->setCursorShape(ImtrTypes::cursor_bar_shape, 1); + editorContainer->setCursorVisible(1, 1); + editorContainer->setCursorFollowMouse(0, 1); + editorContainer->setCursorSize(ImtrTypes::CURSOR_BAR_DEFAULT_SIZE, 1); + editorContainer->setCursorColor(IMTREDITOR_JUCE_NAMESPACE::Colours::red, 1); + + // split + editorContainer->setSplitVisible(true); + editorContainer->setSplitSize(ImtrTypes::SPLIT_DEFAULT_SIZE); + editorContainer->setSplitColor(false, IMTREDITOR_JUCE_NAMESPACE::Colours::white); + + // bufferchooser + editorContainer->setIndexChooserVisible(false); + editorContainer->setIndexChooserSize(ImtrTypes::INDEXCHOOSER_DEFAULT_SIZE); + editorContainer->setIndexChooserPosition(ImtrTypes::bottom_position); + editorContainer->setIndexChooserShape(ImtrTypes::indexchooser_buttons_shape); + + // domainruler + editorContainer->setDomainRulerVisible(true); + editorContainer->setDomainRulerGridVisible(false); + editorContainer->setDomainRulerPosition(true); + editorContainer->setDomainRulerSize(ImtrTypes::DOMAINRULER_DEFAULT_SIZE); + editorContainer->setDomainRulerTimeUnit(ImtrTypes::milliseconds_unit); + setDomainRulerProperty(gensym("bgcolor"), true); + setDomainRulerProperty(gensym("fgcolor"), true); + + + // toolbar + editorContainer->setToolbarVisible(ImtrTypes::toolbar_visible); + editorContainer->setToolbarPosition(ImtrTypes::bottom_position); + editorContainer->setToolbarSize(ImtrTypes::TOOLBAR_DEFAULT_SIZE); + setToolbarProperty(gensym("bgcolor"), true); + + // tabs + editorContainer->setTabsVisible(true); + editorContainer->setTabsSize(ImtrTypes::TABS_DEFAULT_SIZE); + editorContainer->setTabsPosition(true); + setTabsProperty(gensym("color"), true); + + // rangeruler + editorContainer->setRangeRulerVisible(true); + editorContainer->setRangeRulerSize(ImtrTypes::RANGERULER_DEFAULT_SIZE); + editorContainer->setRangeRulerGridVisible(false); + + IMTREDITOR_JUCE_NAMESPACE::Colour defaultBgColor = IMTREDITOR_JUCE_NAMESPACE::Colour((int)(external->default_back_color.red * 255), (int)(external->default_back_color.green * 255), (int)(external->default_back_color.blue * 255)).withAlpha((float)external->default_back_color.alpha); + IMTREDITOR_JUCE_NAMESPACE::Colour defaultFgColor = IMTREDITOR_JUCE_NAMESPACE::Colour((int)(external->default_fore_color.red * 255), (int)(external->default_fore_color.green * 255), (int)(external->default_fore_color.blue * 255)).withAlpha((float)external->default_fore_color.alpha); + + editorContainer->setViewBackgroundColor(-1, defaultBgColor, external->bgcolor_is_default); + editorContainer->setViewForegroundColor(-1, defaultFgColor, true); + + editorContainer->setAlignViewBounds(0); + editorContainer->setMainViewAutoBounds(-1, ImtrTypes::autobounds_off); + editorContainer->setViewAutoBounds(-1, ImtrTypes::autobounds_off); + editorContainer->setViewBoundsToContent(-1); + + editorContainer->setColorShades(defaultBgColor, true); + + editorContainer->resized(); + } + } IMTREDITOR_JUCE_NAMESPACE::ModifierKeys getModifierKeysFromFlags(long maxModifiers) { int modifiers = 0; @@ -529,9 +655,9 @@ if(name != IMTREDITOR_JUCE_NAMESPACE::String()) editorContainer->setViewName(index, name); - editorContainer->setViewForegroundColor(index, imtred->getForegroundColor()); - editorContainer->setViewBackgroundColor(index, imtred->getBackgroundColor()); - //get selection + editorContainer->setViewForegroundColor(index, imtred->getForegroundColor(), external->bgcolor_is_default); + editorContainer->setViewBackgroundColor(index, imtred->getBackgroundColor(), external->bgcolor_is_default); + //get selection editorContainer->setViewSelection(index, imtred->getSelection(), imtred->selectionAsRange()); qelem_set(external->qelem_init_inspector); @@ -564,7 +690,20 @@ else if(fts_is_pointer(a)) ea->setPointer(fts_get_pointer(a)); } -#pragma mark ImtrEditorListener interface + bool + allAtomsAreNumbers(int ac, fts_atom_t *a) + { + bool allNumbers = true; + for(int i = 0; i < ac; i++) + if(!fts_is_number(a+i)) + { + allNumbers = false; + break; + } + return allNumbers; + } + +#pragma mark ImtrEditorListener interface // ImtrEditorListener interface void changeEditorInterface(IMTREDITOR_JUCE_NAMESPACE::Component *editor, void *obj, void *context, IMTREDITOR_JUCE_NAMESPACE::String newInterfaceName, IMTREDITOR_JUCE_NAMESPACE::String oldInterfaceName) { @@ -601,6 +740,8 @@ } } + void appendNewIndex(){} + bool canAppendNewIndex(){return false;} void appendNewView(){} bool canAppendNewView(){return false;}; @@ -622,7 +763,7 @@ void listenObject(void *obj, bool listen){} - void outputCursor(double position, double value, double ringOffset, ImtrTypes::mouse_interaction mouse) + void outputCursor(double position, double value, double ringOffset, ImtrTypes::mouse_interaction mouse, int cursorIndex, bool isExtraCursor) { t_atom a; atom_setfloat(&a, position); @@ -630,6 +771,159 @@ outputAtoms(fts_s_cursor, 2, &a); } + static t_keycode + getMaxKeyCodeFromJuceKeyCode(int code) + { + if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::spaceKey) + return JKEY_SPACEBAR; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::escapeKey) + return JKEY_ESC; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::returnKey) + return JKEY_RETURN; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::tabKey) + return JKEY_TAB; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::deleteKey) + return JKEY_DELETE; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::backspaceKey) + return JKEY_BACKSPACE; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::insertKey) + return JKEY_INSERT; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::upKey) + return JKEY_UPARROW; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::downKey) + return JKEY_DOWNARROW; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::leftKey) + return JKEY_LEFTARROW; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::rightKey) + return JKEY_RIGHTARROW; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::pageUpKey) + return JKEY_PAGEUP; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::pageDownKey) + return JKEY_PAGEDOWN; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::homeKey) + return JKEY_HOME; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::endKey) + return JKEY_END; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F1Key) + return JKEY_F1; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F2Key) + return JKEY_F2; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F3Key) + return JKEY_F3; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F4Key) + return JKEY_F4; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F5Key) + return JKEY_F5; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F6Key) + return JKEY_F6; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F7Key) + return JKEY_F7; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F8Key) + return JKEY_F8; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F9Key) + return JKEY_F9; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F10Key) + return JKEY_F10; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F11Key) + return JKEY_F11; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F12Key) + return JKEY_F12; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F13Key) + return JKEY_F13; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F14Key) + return JKEY_F14; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F15Key) + return JKEY_F15; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::F16Key) + return JKEY_F16; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad0) + return JKEY_NUMPAD0; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad1) + return JKEY_NUMPAD1; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad2) + return JKEY_NUMPAD2; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad3) + return JKEY_NUMPAD3; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad4) + return JKEY_NUMPAD4; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad5) + return JKEY_NUMPAD5; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad6) + return JKEY_NUMPAD6; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad7) + return JKEY_NUMPAD7; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad8) + return JKEY_NUMPAD8; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPad9) + return JKEY_NUMPAD9; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadAdd) + return JKEY_NUMPADADD; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadSubtract) + return JKEY_NUMPADSUBTRACT; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadMultiply) + return JKEY_NUMPADMULTIPLY; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadDivide) + return JKEY_NUMPADDIVIDE; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadSeparator) + return JKEY_NUMPADSEPARATOR; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadDecimalPoint) + return JKEY_NUMPADDECIMALPOINT; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadEquals) + return JKEY_NUMPADEQUALS; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::numberPadDelete) + return JKEY_NUMPADDELETE; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::playKey) + return JKEY_PLAYPAUSE; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::stopKey) + return JKEY_STOP; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::fastForwardKey) + return JKEY_NEXTTRACK; + else if(code == IMTREDITOR_JUCE_NAMESPACE::KeyPress::rewindKey) + return JKEY_PREVTRACK; + else + return (t_keycode)code; + } + + void + outputKey(bool isModifier, ImtrTypes::modifier_key mod, int keyCode, bool isDown) + { + t_atom at[2]; + + if(isModifier) + { + switch(mod) + { + case ImtrTypes::command_modifier: + atom_setsym(at, gensym("command")); + break; + case ImtrTypes::control_modifier: + atom_setsym(at, gensym("control")); + break; + case ImtrTypes::alt_modifier: + atom_setsym(at, gensym("alt")); + break; + case ImtrTypes::shift_modifier: + atom_setsym(at, gensym("shift")); + break; + default: + atom_setsym(at, gensym("")); + break; + } + + if(isDown) + atom_setsym(at+1, gensym("down")); + else + atom_setsym(at+1, gensym("up")); + + outputAtoms(fts_s_key, 2, at); + } + else + { + atom_setlong(at, getMaxKeyCodeFromJuceKeyCode(keyCode)); + outputAtoms(fts_s_key, 1, at); + } + } + void outputProperty(int viewIndex, IMTREDITOR_JUCE_NAMESPACE::String propname) { if(viewIndex >= 0) @@ -783,6 +1077,18 @@ post(fts_symbol_name(getSymbolFromString(error))); } + void + postObjectError(IMTREDITOR_JUCE_NAMESPACE::String error) + { + object_error((t_object *)external, getSymbolFromString(error)->s_name); + } + + void + postObjectWarning(IMTREDITOR_JUCE_NAMESPACE::String warning) + { + object_warn((t_object *)external, getSymbolFromString(warning)->s_name); + } + void doAction(IMTREDITOR_JUCE_NAMESPACE::String action) { static t_object *pcontrol = NULL; @@ -813,7 +1119,7 @@ jmouse_setcursor((t_object *)linklist_getindex(external->attachedviews, i), (t_object *)external, getCursorType(type)); } - void cursorVisibleChanged(bool visible) + void cursorVisibleChanged(bool visible, int index) { external->cursor_visible = visible; } @@ -838,27 +1144,27 @@ if(pname == fts_s_empty_string) { *ac = 1; - fts_set_float(at, editorContainer->getCursorTime()); + fts_set_float(at, editorContainer->getCursorTime(1)); } else if(pname == fts_s_color) { *ac = 4; fts_set_symbol(at, pname); - fts_set_int(at+1, editorContainer->getCursorColor().getRed()); - fts_set_int(at+2, editorContainer->getCursorColor().getGreen()); - fts_set_int(at+3, editorContainer->getCursorColor().getBlue()); + fts_set_int(at+1, editorContainer->getCursorColor(1).getRed()); + fts_set_int(at+2, editorContainer->getCursorColor(1).getGreen()); + fts_set_int(at+3, editorContainer->getCursorColor(1).getBlue()); } else if(pname == fts_s_size) { *ac = 2; fts_set_symbol(at, pname); - fts_set_int(at+1, editorContainer->getCursorSize()); + fts_set_int(at+1, editorContainer->getCursorSize(1)); } else if(pname == fts_s_visible) { *ac = 2; fts_set_symbol(at, pname); - fts_set_int(at+1, (editorContainer->isCursorVisible()) ? 1 : 0); + fts_set_int(at+1, (editorContainer->isCursorVisible(1)) ? 1 : 0); } else *ac = 0; @@ -1280,7 +1586,7 @@ else if(pname == fts_s_visibleindexes) { int i; - IMTREDITOR_JUCE_NAMESPACE::Array <int> indexes = editorContainer->getEditor(idx)->getVisibleIndexes(); + IMTREDITOR_JUCE_NAMESPACE::Array <int> indexes = editorContainer->getEditor(idx)->getVisibleColumnIndexes(); *ac = indexes.size() + 2; fts_set_int(at, idx); fts_set_symbol(at+1, pname); @@ -1547,10 +1853,12 @@ } void copyFromView(int viewIndex, double time, double duration, bool remove){} + void copyFromViewByIndex(int viewIndex, IMTREDITOR_JUCE_NAMESPACE::Array<int> indexes, bool remove){} + void pasteToView(int viewIndex, double time, double duration, bool replace){} void pasteAddBuffer(){} void pasteAddTrack(){} - + void pasteAppendInBuffer(){} void domainChanged(double min, double max) { external->domain[0] = min; @@ -1557,6 +1865,14 @@ external->domain[1] = max; } + void regionChanged(double min, double max) + { + external->region_begin = min; + external->region_end = max; + } + + void foremostChanged(int foremostIndex){} + static t_symbol * getSymToolName(ImtrTypes::tool_name tool_name) { @@ -1760,12 +2076,28 @@ editorContainer->setOrientation(ImtrTypes::vertical); } - void setColorShades(IMTREDITOR_JUCE_NAMESPACE::Colour color) + void setColorShades(IMTREDITOR_JUCE_NAMESPACE::Colour color, bool isDefault) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setColorShades(color); + editorContainer->setColorShades(color, isDefault); } + void setFgColor(t_jrgba *color) + { + IMTREDITOR_JUCE_NAMESPACE::Colour newfgc = IMTREDITOR_JUCE_NAMESPACE::Colour(color->red * 255.0, + color->green * 255.0, + color->blue * 255.0).withAlpha((float)color->alpha); + editorContainer->setForegroundColors(newfgc, true); + } + + void setBgColor(t_jrgba *color, bool fromTheme) + { + IMTREDITOR_JUCE_NAMESPACE::Colour newbgc = IMTREDITOR_JUCE_NAMESPACE::Colour(color->red * 255.0, + color->green * 255.0, + color->blue * 255.0).withAlpha((float)color->alpha); + setColorShades(newbgc, external->bgcolor_is_default); + } + void setForemost(int index) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; @@ -1797,23 +2129,23 @@ if(prop == fts_s_color) { if(ac == 3 && fts_is_number(at) && fts_is_number(at+1) && fts_is_number(at+2)) - editorContainer->setCursorColor(IMTREDITOR_JUCE_NAMESPACE::Colour(fts_get_number_int(at), fts_get_number_int(at+1), fts_get_number_int(at+2))); + editorContainer->setCursorColor(IMTREDITOR_JUCE_NAMESPACE::Colour(fts_get_number_int(at), fts_get_number_int(at+1), fts_get_number_int(at+2)), 1); } else if(prop == fts_s_size) { if(ac == 1 && fts_is_number(at)) - editorContainer->setCursorSize((int)fts_get_number_int(at)); + editorContainer->setCursorSize((int)fts_get_number_int(at), 1); } else if(prop == fts_s_visible) { if(ac == 1 && fts_is_number(at)) - editorContainer->setCursorVisible((int)fts_get_number_int(at)); + editorContainer->setCursorVisible((int)fts_get_number_int(at), 1); } } void moveCursor(float time) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->moveCursor(time); + editorContainer->moveCursor(time, 1); } void setRegion(float start, float end) @@ -1843,12 +2175,12 @@ } } - void setDomainScrollbarProperty(fts_symbol_t prop, int ac, fts_atom_t *at) + void setDomainScrollbarProperty(fts_symbol_t prop, bool isDefault = false) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; if(prop == fts_s_color) editorContainer->setDomainScrollbarColor(false, IMTREDITOR_JUCE_NAMESPACE::Colour((int)(external->domainScrollbar_color.red * 255), (int)(external->domainScrollbar_color.green * 255), - (int)(external->domainScrollbar_color.blue * 255)).withAlpha((float)external->domainScrollbar_color.alpha)); + (int)(external->domainScrollbar_color.blue * 255)).withAlpha((float)external->domainScrollbar_color.alpha), isDefault); else if(prop == fts_s_visible) editorContainer->setDomainScrollbarVisible((external->domainScrollbar_visible == 1)); else if(prop == fts_s_size) @@ -1866,7 +2198,7 @@ editorContainer->setRangeRulerGridVisible((external->rangeruler_grid == 1)); } - void setDomainRulerProperty(fts_symbol_t prop) + void setDomainRulerProperty(fts_symbol_t prop, bool isDefault = false) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; if(prop == fts_s_visible) @@ -1884,10 +2216,10 @@ (int)(external->domainruler_fgcolor.blue * 255)).withAlpha((float)external->domainruler_fgcolor.alpha)); else if(prop == fts_s_bgcolor) editorContainer->setDomainRulerBackgroundColor(IMTREDITOR_JUCE_NAMESPACE::Colour((int)(external->domainruler_bgcolor.red * 255), (int)(external->domainruler_bgcolor.green * 255), - (int)(external->domainruler_bgcolor.blue * 255)).withAlpha((float)external->domainruler_bgcolor.alpha)); - } + (int)(external->domainruler_bgcolor.blue * 255)).withAlpha((float)external->domainruler_bgcolor.alpha), isDefault); + } - int setToolbarProperty(fts_symbol_t prop) + int setToolbarProperty(fts_symbol_t prop, bool isDefault = false) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; if(prop == fts_s_visible) @@ -1898,7 +2230,7 @@ editorContainer->setToolbarSize((int)external->toolbar_size); else if(prop == fts_s_bgcolor) editorContainer->setToolbarBackgroundColor(IMTREDITOR_JUCE_NAMESPACE::Colour((int)(external->toolbar_bgcolor.red * 255), (int)(external->toolbar_bgcolor.green * 255), - (int)(external->toolbar_bgcolor.blue * 255)).withAlpha((float)external->toolbar_bgcolor.alpha)); + (int)(external->toolbar_bgcolor.blue * 255)).withAlpha((float)external->toolbar_bgcolor.alpha), isDefault); else return 0; @@ -2034,13 +2366,13 @@ color = color.withAlpha((float)fts_get_number_float(at+3)); //const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewForegroundColor(index, color); + editorContainer->setViewForegroundColor(index, color, external->bgcolor_is_default); } else if(ac == 1 && fts_is_symbol(at)) { IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::black); - editorContainer->setViewForegroundColor(index, color); + editorContainer->setViewForegroundColor(index, color, external->bgcolor_is_default); } } else if(prop == fts_s_bgcolor) @@ -2145,7 +2477,7 @@ if(ac == 1 && fts_is_number(at)) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewForegroundColorGradient(index, (fts_get_number_int(at) == 1)); + editorContainer->setViewForegroundColorGradient(index, (fts_get_number_int(at) == 1)); } } else if(prop == fts_s_opacity) @@ -2191,12 +2523,12 @@ indexes.add((int)fts_get_int(at+i)); const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewVisibleIndexes(index, false, indexes); + editorContainer->setViewVisibleColumnIndexes(index, false, indexes); } else if(ac > 0 && fts_is_symbol(at) && fts_get_symbol(at) == fts_s_all) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewVisibleIndexes(index, true, indexes); + editorContainer->setViewVisibleColumnIndexes(index, true, indexes); } } else if(prop == fts_s_paramcols) @@ -2538,13 +2870,13 @@ color = color.withAlpha((float)fts_get_number_float(at+4)); const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewHeaderBackgroundColor(index, color); + editorContainer->setViewHeaderBackgroundColor(index, color, external->bgcolor_is_default); } else if(ac > 1 && fts_is_symbol(at+1)) { IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at+1))); IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); - editorContainer->setViewHeaderBackgroundColor(index, color); + editorContainer->setViewHeaderBackgroundColor(index, color, external->bgcolor_is_default); } } else if(header_prop == fts_s_fgcolor) @@ -2571,13 +2903,13 @@ color = color.withAlpha((float)fts_get_number_float(at+4)); const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewHeaderForegroundColor(index, color); + editorContainer->setViewHeaderForegroundColor(index, color, external->bgcolor_is_default); } else if(ac > 1 && fts_is_symbol(at)) { IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at+1))); IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); - editorContainer->setViewHeaderForegroundColor(index, color); + editorContainer->setViewHeaderForegroundColor(index, color, external->bgcolor_is_default); } } else if(header_prop == fts_s_bordercolor) @@ -2604,13 +2936,13 @@ color = color.withAlpha((float)fts_get_number_float(at+4)); const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; - editorContainer->setViewHeaderBorderColor(index, color); + editorContainer->setViewHeaderBorderColor(index, color, external->bgcolor_is_default); } else if(ac > 1 && fts_is_symbol(at+1)) { IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at+1))); IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::grey); - editorContainer->setViewHeaderBorderColor(index, color); + editorContainer->setViewHeaderBorderColor(index, color, external->bgcolor_is_default); } } } @@ -2765,15 +3097,83 @@ setEditorAtomFromFtsAtom(atoms+i, at+i); editorContainer->deleteViewValues(index, ac, atoms); } - } + } + else if(prop == fts_s_rowsize) + { + if(ac > 0 && fts_is_number(at)) + { + const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; + editorContainer->setViewRowSize(index, (int)fts_get_number_int(at)); + external->objectsChangeType[index] = ImtrTypes::other_change; + object_attr_touch((t_object *)external, gensym("view_rowsize")); + } + } + else if(prop == fts_s_columnsize) + { + if(ac > 0) + { + if(fts_is_number(at)) + { + const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; + editorContainer->setViewColumnSize(index, (int)fts_get_number_int(at)); + external->objectsChangeType[index] = ImtrTypes::other_change; + object_attr_touch((t_object *)external, gensym("view_columnsize")); + } + else if(fts_is_symbol(at) && (fts_get_symbol(at) == gensym("reset") || atom_getsym(at) == gensym("default"))) + { + const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; + editorContainer->resetViewColumnSize(index); + external->objectsChangeType[index] = ImtrTypes::other_change; + object_attr_touch((t_object *)external, gensym("view_columnsize")); + } + } + } + else if(prop == fts_s_columnsizes) + { + IMTREDITOR_JUCE_NAMESPACE::String colName = IMTREDITOR_JUCE_NAMESPACE::String(); + IMTREDITOR_JUCE_NAMESPACE::StringArray columnNames; + IMTREDITOR_JUCE_NAMESPACE::Array<int> columnSizes; + int colSize; + bool defaultSizes = false; + + if(ac == 1 && fts_is_symbol(at) && fts_get_symbol(at) == gensym("default")) + defaultSizes = true; + else + { + if(allAtomsAreNumbers(ac, at)) + { + for(int i = 0; i < ac; i++) + columnSizes.add((int)fts_get_number_int(at+i)); + } + else + { + for(int i = 0; i < ac; i+=2) + { + if(ac-i >= 2 && fts_is_symbol(at+i) && fts_is_number(at+i+1)) + { + colName = IMTREDITOR_JUCE_NAMESPACE::String(fts_get_symbol(at+i)->s_name); + colSize = (int)fts_get_number_int(at+i+1); + columnNames.add(colName); + columnSizes.add(colSize); + } + } + } + } + + const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; + if(defaultSizes || (columnNames.size() == columnSizes.size()) || (columnNames.isEmpty() && !columnSizes.isEmpty())) + editorContainer->setViewColumnSizes(index, columnNames, columnSizes); + external->objectsChangeType[index] = ImtrTypes::other_change; + object_attr_touch((t_object *)external, gensym("view_columnsizes")); + } } } - void setTabsProperty(fts_symbol_t prop) + void setTabsProperty(fts_symbol_t prop, bool isDefault = false) { const IMTREDITOR_JUCE_NAMESPACE::MessageManagerLock mmLock; if(prop == fts_s_bgcolor) - editorContainer->setTabsBarBackgroundColor(IMTREDITOR_JUCE_NAMESPACE::Colour(external->tabs_color.red * 255, external->tabs_color.green * 255, external->tabs_color.blue * 255)); + editorContainer->setTabsBarBackgroundColor(IMTREDITOR_JUCE_NAMESPACE::Colour(external->tabs_color.red * 255, external->tabs_color.green * 255, external->tabs_color.blue * 255), isDefault); if(prop == fts_s_visible) editorContainer->setTabsVisible((external->tabs_visible == 1)); else if(prop == fts_s_position) @@ -2990,6 +3390,51 @@ #pragma mark paint method +void +ftmeditor_update_default_bgcolor(ftmeditor_t *self, bool setToContainer) +{ + t_object *patcher = jbox_get_patcher((t_object *)self); + t_jrgba patchbubcol; + t_jrgba patchtxtcol; + object_attr_getcolor(patcher, gensym("bubble_bgcolor"), &patchbubcol); + + self->default_back_color.red = patchbubcol.red; + self->default_back_color.green = patchbubcol.green; + self->default_back_color.blue = patchbubcol.blue; + self->default_back_color.alpha = patchbubcol.alpha; + + object_attr_getcolor(patcher, gensym("textcolor"), &patchtxtcol); + + self->default_fore_color.red = patchtxtcol.red; + self->default_fore_color.green = patchtxtcol.green; + self->default_fore_color.blue = patchtxtcol.blue; + self->default_fore_color.alpha = patchtxtcol.alpha; + + if(setToContainer) + { + IMTREDITOR_JUCE_NAMESPACE::Colour defaultBgColor = IMTREDITOR_JUCE_NAMESPACE::Colour((int)(self->default_back_color.red * 255), (int)(self->default_back_color.green * 255), (int)(self->default_back_color.blue * 255)).withAlpha((float)self->default_back_color.alpha); + IMTREDITOR_JUCE_NAMESPACE::Colour defaultFgColor = IMTREDITOR_JUCE_NAMESPACE::Colour((int)(self->default_fore_color.red * 255), (int)(self->default_fore_color.green * 255), (int)(self->default_fore_color.blue * 255)).withAlpha((float)self->default_fore_color.alpha); + + self->container->editorContainer->setDefaultBackgroundColor(defaultBgColor); + self->container->editorContainer->setDefaultForegroundColor(defaultFgColor); + } +} + +static void +ftmeditor_check_themecolors(ftmeditor_t *self) +{ + ftmeditor_update_default_bgcolor(self, true); + if(self->bgcolor_is_default) + { + if(!ftmeditor_bgcolor_is_default(self)) + { + ftmeditor_set_bgcolor_by_rgb(self, self->default_back_color.red, self->default_back_color.green, self->default_back_color.blue, self->default_back_color.alpha, true, true); + ftmeditor_set_fgcolor_to_default(self); + qelem_set(self->qelem_mouse_refresh); + } + } +} + void ftmeditor_paint(ftmeditor_t *self, t_object *patcherview) { t_rect r; @@ -3007,6 +3452,8 @@ ftmeditor_rebounds_container(self, patcherview); + ftmeditor_check_themecolors(self); + t_rect srcRect, dstRect; srcRect.x = 0; srcRect.y = 0; srcRect.width = r.width; srcRect.height = r.height; dstRect.x = 1; dstRect.y = 1; dstRect.width = r.width; dstRect.height = r.height; @@ -3271,6 +3718,12 @@ { ftmeditor_clear_editors(self, 0, 0, NULL); ftmeditor_create_multieditor(self, ac, at); + + if(self->bgcolor_is_default) + { + ftmeditor_reinit_bgcolor_to_default(self); + ftmeditor_set_fgcolor_to_default(self); + } /*reset domain bounds if domain_bounds was previously setted to a greater length*/ if(self->domain[1] != self->domain[0] && self->domain[1] > self->container->editorContainer->getRangeMax()) self->domain[1] = self->domain[0] = 0.0f; @@ -3914,7 +4367,7 @@ ret = -1; if(ret > 0) - self->container->editorContainer->setCursorColor(color); + self->container->editorContainer->setCursorColor(color, 1); } else if(prop == fts_s_size) { @@ -3921,7 +4374,7 @@ if(ac > 0 && fts_is_number(at)) { self->cursor_size = fts_get_number_int(at); - self->container->editorContainer->setCursorSize((int)self->cursor_size); + self->container->editorContainer->setCursorSize((int)self->cursor_size, 1); } else ret = -1; @@ -3931,7 +4384,7 @@ if(ac > 0 && fts_is_number(at)) { self->cursor_visible = fts_get_number_int(at); - self->container->editorContainer->setCursorVisible((int)self->cursor_visible); + self->container->editorContainer->setCursorVisible((int)self->cursor_visible, 1); } else ret = -1; @@ -3941,7 +4394,7 @@ if(ac > 0 && fts_is_number(at)) { self->cursor_followmouse = (int)fts_get_number_int(at); - self->container->editorContainer->setCursorFollowMouse((int)self->cursor_followmouse); + self->container->editorContainer->setCursorFollowMouse((int)self->cursor_followmouse, 1); ret = 2; } @@ -4152,6 +4605,34 @@ } static void +ftmeditor_set_domainscrollbar_color_to_default(ftmeditor_t *self, bool setToComponents) +{ + self->domainScrollbar_color.red = self->default_back_color.red; + self->domainScrollbar_color.green = self->default_back_color.green; + self->domainScrollbar_color.blue = self->default_back_color.blue; + self->domainScrollbar_color.alpha = self->default_back_color.alpha; + self->domainscrollbar_color_is_default = true; + object_attr_touch((t_object *)self, gensym("domainscrollbar_color")); + + if(setToComponents) + self->container->setDomainScrollbarProperty(gensym("color"), true); +} + +void +ftmeditor_set_domainscrollbar_color_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault) +{ + self->domainScrollbar_color.red = self->back_color.red; + self->domainScrollbar_color.green = self->back_color.green; + self->domainScrollbar_color.blue = self->back_color.blue; + self->domainScrollbar_color.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("domainscrollbar_color")); + + self->domainscrollbar_color_is_default = isDefault; + if(setToComponents) + self->container->setDomainScrollbarProperty(gensym("color")); +} + +static void ftmeditor_set_domainscrollbar_property(ftmeditor_t *self, fts_symbol_t prop, int ac, fts_atom_t *at) { if(prop == fts_s_color) @@ -4164,15 +4645,25 @@ IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colour(self->back_color.red * 255, self->back_color.green * 255, self->back_color.blue * 255).brighter(); self->domainScrollbar_color.red = color.getRed() / 255.0; self->domainScrollbar_color.green = color.getGreen() / 255.0; self->domainScrollbar_color.blue = color.getBlue() / 255.0; self->domainScrollbar_color.alpha = 1.0f; + + self->domainscrollbar_color_is_default = false; } else { - IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(sym)); - IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); - self->domainScrollbar_color.red = color.getFloatRed(); - self->domainScrollbar_color.green = color.getFloatGreen(); - self->domainScrollbar_color.blue = color.getFloatBlue(); - self->domainScrollbar_color.alpha = 1.0f; + t_symbol *colorname = atom_getsym(at); + if(colorname == fts_s_default) + ftmeditor_set_domainscrollbar_color_to_default(self, true); + else + { + IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(sym)); + IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); + self->domainScrollbar_color.red = color.getFloatRed(); + self->domainScrollbar_color.green = color.getFloatGreen(); + self->domainScrollbar_color.blue = color.getFloatBlue(); + self->domainScrollbar_color.alpha = 1.0f; + + self->domainscrollbar_color_is_default = false; + } } } else if(ac == 3 && fts_is_int(at) && fts_is_int(at+1) && fts_is_int(at+2))//rgb @@ -4186,6 +4677,15 @@ self->domainScrollbar_color.blue = fts_get_number_float(at+2); self->domainScrollbar_color.alpha = fts_get_number_float(at+3); } } + else if(prop == fts_s_color_is_default) + { + if(ac == 1 && fts_is_number(at)) + { + self->domainscrollbar_color_is_default = atom_getlong(at); + if(self->domainscrollbar_color_is_default) + ftmeditor_set_domainscrollbar_color_to_default(self, true); + } + } else if(prop == fts_s_visible) { if(ac == 1 && fts_is_number(at)) @@ -4197,7 +4697,7 @@ self->domainScrollbar_size = fts_get_number_int(at); } - self->container->setDomainScrollbarProperty( prop, ac, at); + self->container->setDomainScrollbarProperty(prop); qelem_set(self->qelem_ftmeditor_repaint); } @@ -4273,6 +4773,49 @@ } static void +ftmeditor_set_domainruler_fgcolor_to_default(ftmeditor_t *self, bool setToComponents) +{ + self->domainruler_fgcolor.red = self->default_fore_color.red; + self->domainruler_fgcolor.green = self->default_fore_color.green; + self->domainruler_fgcolor.blue = self->default_fore_color.blue; + self->domainruler_fgcolor.alpha = self->default_fore_color.alpha; + self->domainruler_fgcolor_is_default = true; + object_attr_touch((t_object *)self, gensym("domainruler_fgcolor")); + + if(setToComponents) + self->container->setDomainRulerProperty(gensym("fgcolor")); +} + +static void +ftmeditor_set_domainruler_bgcolor_to_default(ftmeditor_t *self, bool setToComponents) +{ + self->domainruler_bgcolor.red = self->default_back_color.red; + self->domainruler_bgcolor.green = self->default_back_color.green; + self->domainruler_bgcolor.blue = self->default_back_color.blue; + self->domainruler_bgcolor.alpha = self->default_back_color.alpha; + self->domainruler_bgcolor_is_default = true; + object_attr_touch((t_object *)self, gensym("domainruler_bgcolor")); + + if(setToComponents) + self->container->setDomainRulerProperty(gensym("bgcolor"), true); +} + +void +ftmeditor_set_domainruler_bgcolor_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault) +{ + self->domainruler_bgcolor.red = self->back_color.red; + self->domainruler_bgcolor.green = self->back_color.green; + self->domainruler_bgcolor.blue = self->back_color.blue; + self->domainruler_bgcolor.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("domainruler_bgcolor")); + + self->domainruler_bgcolor_is_default = isDefault; + + if(setToComponents) + self->container->setDomainRulerProperty(gensym("bgcolor")); +} + +static void ftmeditor_set_domainruler_property(ftmeditor_t *self, fts_symbol_t prop, int ac, fts_atom_t *at) { if(prop == fts_s_visible) @@ -4314,24 +4857,42 @@ { if(ac == 3 && fts_is_number(at) && fts_is_number(at+1) && fts_is_number(at+2)) { - self->domainruler_fgcolor.red = fts_get_int(at) / 255.0; self->domainruler_fgcolor.green = fts_get_int(at+1) / 255.0; + self->domainruler_fgcolor.red = fts_get_int(at) / 255.0; self->domainruler_fgcolor.green = fts_get_int(at+1) / 255.0; self->domainruler_fgcolor.blue = fts_get_int(at+2) / 255.0; self->domainruler_fgcolor.alpha = 1.0f; + self->domainruler_fgcolor_is_default = false; } else if(ac == 4 && fts_is_float(at) && fts_is_float(at+1) && fts_is_float(at+2) && fts_is_float(at+3))//hsua { self->domainruler_fgcolor.red = fts_get_number_float(at); self->domainruler_fgcolor.green = fts_get_number_float(at+1); self->domainruler_fgcolor.blue = fts_get_number_float(at+2); self->domainruler_fgcolor.alpha = fts_get_number_float(at+3); + self->domainruler_fgcolor_is_default = false; } else if(ac == 1 && fts_is_symbol(at)) { - IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); - IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::black); - self->domainruler_fgcolor.red = color.getFloatRed(); - self->domainruler_fgcolor.green = color.getFloatGreen(); - self->domainruler_fgcolor.blue = color.getFloatBlue(); - self->domainruler_fgcolor.alpha = 1.0f; + t_symbol *colorname = atom_getsym(at); + if(colorname == fts_s_default) + ftmeditor_set_domainruler_fgcolor_to_default(self, true); + else + { + IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); + IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::black); + self->domainruler_fgcolor.red = color.getFloatRed(); + self->domainruler_fgcolor.green = color.getFloatGreen(); + self->domainruler_fgcolor.blue = color.getFloatBlue(); + self->domainruler_fgcolor.alpha = 1.0f; + self->domainruler_fgcolor_is_default = false; + } } } + else if(prop == fts_s_fgcolor_is_default) + { + if(ac == 1 && fts_is_number(at)) + { + self->domainruler_fgcolor_is_default = atom_getlong(at); + if(self->domainruler_fgcolor_is_default) + ftmeditor_set_domainruler_fgcolor_to_default(self, true); + } + } else if(prop == fts_s_bgcolor) { if(ac == 3 && fts_is_number(at) && fts_is_number(at+1) && fts_is_number(at+2)) @@ -4353,13 +4914,21 @@ self->domainruler_bgcolor.blue = color.getFloatBlue(); self->domainruler_bgcolor.alpha = 1.0f; } - } + } + else if(prop == fts_s_bgcolor_is_default) + { + if(ac == 1 && fts_is_number(at)) + { + self->domainruler_bgcolor_is_default = atom_getlong(at); + if(self->domainruler_bgcolor_is_default) + ftmeditor_set_domainruler_bgcolor_to_default(self, true); + } + } self->container->setDomainRulerProperty(prop); qelem_set(self->qelem_ftmeditor_repaint); } - FTMEXT_METHOD_VARARGS(ftmeditor, ruler) { ftmeditor_t *self = (ftmeditor_t *)FTMEXT_GET_EXT(); @@ -4384,6 +4953,35 @@ FTMEXT_METHOD_RETURN; } +static void +ftmeditor_set_toolbar_bgcolor_to_default(ftmeditor_t *self, bool setToComponents) +{ + self->toolbar_bgcolor.red = self->default_back_color.red; + self->toolbar_bgcolor.green = self->default_back_color.green; + self->toolbar_bgcolor.blue = self->default_back_color.blue; + self->toolbar_bgcolor.alpha = self->default_back_color.alpha; + self->toolbar_bgcolor_is_default = true; + object_attr_touch((t_object *)self, gensym("toolbar_bgcolor")); + + if(setToComponents) + self->container->setToolbarProperty(gensym("bgcolor"), true); +} + +void +ftmeditor_set_toolbar_bgcolor_to_bgcolor(ftmeditor_t *self, bool setToComponents, bool isDefault) +{ + self->toolbar_bgcolor.red = self->back_color.red; + self->toolbar_bgcolor.green = self->back_color.green; + self->toolbar_bgcolor.blue = self->back_color.blue; + self->toolbar_bgcolor.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("toolbar_bgcolor")); + + self->toolbar_bgcolor_is_default = isDefault; + + if(setToComponents) + self->container->setToolbarProperty(gensym("bgcolor")); +} + static int ftmeditor_set_toolbar_property(ftmeditor_t *self, t_symbol *prop, int ac, t_atom *at) { @@ -4452,19 +5050,38 @@ self->toolbar_bgcolor.alpha = fts_get_number_float(at + 3); else self->toolbar_bgcolor.alpha = 1.0f; + + self->toolbar_bgcolor_is_default = false; } else if(ac == 1 && fts_is_symbol(at)) { - IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); - IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); - self->toolbar_bgcolor.red = color.getFloatRed(); - self->toolbar_bgcolor.green = color.getFloatGreen(); - self->toolbar_bgcolor.blue = color.getFloatBlue(); - self->toolbar_bgcolor.alpha = 1.0f; + t_symbol *colorname = atom_getsym(at); + if(colorname == fts_s_default) + ftmeditor_set_toolbar_bgcolor_to_default(self, true); + else + { + IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); + IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); + self->toolbar_bgcolor.red = color.getFloatRed(); + self->toolbar_bgcolor.green = color.getFloatGreen(); + self->toolbar_bgcolor.blue = color.getFloatBlue(); + self->toolbar_bgcolor.alpha = 1.0f; + + self->toolbar_bgcolor_is_default = false; + } } else ret = -1; - } + } + else if(prop == fts_s_bgcolor_is_default) + { + if(ac == 1 && fts_is_number(at)) + { + self->toolbar_bgcolor_is_default = atom_getlong(at); + if(self->toolbar_bgcolor_is_default) + ftmeditor_set_toolbar_bgcolor_to_default(self, true); + } + } else ret = 0; @@ -4705,15 +5322,161 @@ FTMEXT_METHOD_RETURN; } -static void -ftmeditor_set_bgcolor(ftmeditor_t *self, fts_symbol_t s, int ac, fts_atom_t *at) +/**/ +#pragma mark bgcolor and default colors + +void +ftmeditor_set_fgcolor_to_default(ftmeditor_t *self) { + self->container->setFgColor(&self->default_fore_color); + + if(self->tabs_color_is_default) + ftmeditor_set_tabs_color_to_default(self, true); + + if(self->domainruler_fgcolor_is_default) + ftmeditor_set_domainruler_fgcolor_to_default(self, true); + + ftmeditor_refresh(self); + qelem_set(self->qelem_ftmeditor_refresh); +} + +void ftmeditor_reinit_bgcolor_to_default(ftmeditor_t *self) +{ + if(self->bgcolor_is_default) + { + ftmeditor_update_default_bgcolor(self, true); + ftmeditor_set_bgcolor_by_rgb(self, self->default_back_color.red, self->default_back_color.green, self->default_back_color.blue, self->default_back_color.alpha, true, true); + ftmeditor_set_fgcolor_to_default(self); + } +} +bool +ftmeditor_bgcolor_is_default(ftmeditor_t *self) +{ + ftmeditor_update_default_bgcolor(self, true); + + return (self->back_color.red == self->default_back_color.red && + self->back_color.green == self->default_back_color.green && + self->back_color.blue == self->default_back_color.blue && + self->back_color.alpha == self->default_back_color.alpha); +} + +static void +ftmeditor_set_bgcolor_to_default(ftmeditor_t *self) +{ + self->back_color.red = self->default_back_color.red; + self->back_color.green = self->default_back_color.green; + self->back_color.blue = self->default_back_color.blue; + self->back_color.alpha = self->default_back_color.alpha; + self->bgcolor_is_default = true; + object_attr_touch((t_object *)self, gensym("bgcolor")); +} + +static bool +ftmeditor_same_colors(t_jrgba first, t_jrgba second) +{ + return (first.red == second.red && first.green == second.green && first.blue == second.blue && first.alpha == second.alpha); +} + +void +ftmeditor_set_bgcolor_by_rgb(ftmeditor_t *self, double r, double g, double b, float alpha, bool fromTheme, bool isDefault) +{ + t_jrgba old_back_color; + old_back_color.red = self->back_color.red; + old_back_color.green = self->back_color.green; + old_back_color.blue = self->back_color.blue; + old_back_color.alpha = self->back_color.alpha; + + self->back_color.red = r; + self->back_color.green = g; + self->back_color.blue = b; + self->back_color.alpha = alpha; + object_attr_touch((t_object *)self, gensym("bgcolor")); + + self->bgcolor_is_default = self->bgcolor_is_default && fromTheme; + + self->container->setBgColor(&self->back_color, fromTheme); + + // set bgcolor for all components + self->region_color.red = self->back_color.red; + self->region_color.green = self->back_color.green; + self->region_color.blue = self->back_color.blue; + self->region_color.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("region_color") ); + + if(self->loadingAttributes != 1) //not set beacause component colors will arrive later + { + if(self->tabs_color_is_default || ftmeditor_same_colors(self->tabs_color, old_back_color)) + ftmeditor_set_tabs_color_to_bgcolor(self, true, isDefault); + if(self->domainscrollbar_color_is_default || ftmeditor_same_colors(self->domainScrollbar_color, old_back_color)) + ftmeditor_set_domainscrollbar_color_to_bgcolor(self, true, isDefault); + if(self->domainruler_bgcolor_is_default || ftmeditor_same_colors(self->domainruler_bgcolor, old_back_color)) + ftmeditor_set_domainruler_bgcolor_to_bgcolor(self, true, isDefault); + if(self->toolbar_bgcolor_is_default || ftmeditor_same_colors(self->toolbar_bgcolor, old_back_color)) + ftmeditor_set_toolbar_bgcolor_to_bgcolor(self, true, isDefault); + } + + self->split_color.red = self->back_color.red; + self->split_color.green = self->back_color.green; + self->split_color.blue = self->back_color.blue; + self->split_color.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("splitbars_color") ); + object_attr_touch((t_object *)self, gensym("split_color") ); + + ftmeditor_refresh(self); + qelem_set(self->qelem_ftmeditor_refresh); +} + +static void +ftmeditor_set_bgcolor_by_color_name(ftmeditor_t *self, t_symbol *colorname, bool fromTheme) +{ + IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(colorname)); + IMTREDITOR_JUCE_NAMESPACE::Colour bgcolor = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); + self->container->setColorShades(bgcolor, fromTheme); + + self->back_color.red = bgcolor.getFloatRed(); + self->back_color.green = bgcolor.getFloatGreen(); + self->back_color.blue = bgcolor.getFloatBlue(); + self->back_color.alpha = 1.0f; + object_attr_touch((t_object *)self, gensym("bgcolor") ); + + // set bgcolor for all components + self->region_color.red = self->back_color.red; + self->region_color.green = self->back_color.green; + self->region_color.blue = self->back_color.blue; + self->region_color.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("region_color") ); + + if(self->tabs_color_is_default) + ftmeditor_set_tabs_color_to_bgcolor(self, true, false); + if(self->domainscrollbar_color_is_default) + ftmeditor_set_domainscrollbar_color_to_bgcolor(self, true, false); + if(self->domainruler_bgcolor_is_default) + ftmeditor_set_domainruler_bgcolor_to_bgcolor(self, true, false); + if(self->toolbar_bgcolor_is_default) + ftmeditor_set_toolbar_bgcolor_to_bgcolor(self, true, false); + + self->split_color.red = self->back_color.red; + self->split_color.green = self->back_color.green; + self->split_color.blue = self->back_color.blue; + self->split_color.alpha = self->back_color.alpha; + object_attr_touch((t_object *)self, gensym("splitbars_color") ); + object_attr_touch((t_object *)self, gensym("split_color") ); + + self->bgcolor_is_default = fromTheme; + + ftmeditor_refresh(self); + qelem_set(self->qelem_ftmeditor_refresh); +} + +static void +ftmeditor_set_bgcolor(ftmeditor_t *self, fts_symbol_t s, int ac, fts_atom_t *at, bool fromTheme) +{ if(ac == 3 && fts_is_int(at) && fts_is_int(at+1) && fts_is_int(at+2)) { self->back_color.red = fts_get_int(at) / 255.0; self->back_color.green = fts_get_int(at+1) / 255.0; self->back_color.blue = fts_get_int(at+2) / 255.0; self->back_color.alpha = 1.0f; - self->container->setColorShades(IMTREDITOR_JUCE_NAMESPACE::Colour(fts_get_number_int(at), fts_get_number_int(at+1), fts_get_number_int(at+2))); + ftmeditor_set_bgcolor_by_rgb(self, self->back_color.red, self->back_color.green, self->back_color.blue, self->back_color.alpha, fromTheme, false); qelem_set(self->qelem_ftmeditor_repaint); } else if(ac == 4 && fts_is_float(at) && fts_is_float(at+1) && fts_is_float(at+2) && fts_is_float(at+3)) @@ -4721,19 +5484,40 @@ self->back_color.red = fts_get_number_float(at); self->back_color.green = fts_get_number_float(at+1); self->back_color.blue = fts_get_number_float(at+2); self->back_color.alpha = fts_get_number_float(at+3); - self->container->setColorShades(IMTREDITOR_JUCE_NAMESPACE::Colour((int)(self->back_color.red * 255), (int)(self->back_color.green * 255), - (int)(self->back_color.blue * 255)).withAlpha((float)self->back_color.alpha)); + ftmeditor_set_bgcolor_by_rgb(self, self->back_color.red, self->back_color.green, self->back_color.blue, self->back_color.alpha, fromTheme, false); qelem_set(self->qelem_ftmeditor_repaint); } else if(ac == 1 && fts_is_symbol(at)) { - IMTREDITOR_JUCE_NAMESPACE::String name = IMTREDITOR_JUCE_NAMESPACE::String(fts_symbol_name(fts_get_symbol(at))); - IMTREDITOR_JUCE_NAMESPACE::Colour color = IMTREDITOR_JUCE_NAMESPACE::Colours::findColourForName( name, IMTREDITOR_JUCE_NAMESPACE::Colours::white); - self->container->setColorShades(color); - qelem_set(self->qelem_ftmeditor_repaint); + t_symbol *colorname = atom_getsym(at); + if(colorname == fts_s_default) + { + ftmeditor_update_default_bgcolor(self, true); + self->bgcolor_is_default = true; + ftmeditor_set_bgcolor_by_rgb(self, self->default_back_color.red, self->default_back_color.green, self->default_back_color.blue, self->default_back_color.alpha, self->bgcolor_is_default, self->bgcolor_is_default); + } + else + { + self->bgcolor_is_default = false; + ftmeditor_set_bgcolor_by_color_name(self, colorname, fromTheme); + ... [truncated message content] |
From: <bor...@us...> - 2025-06-10 13:47:12
|
Revision: 3806 http://sourceforge.net/p/ftm/code/3806 Author: borghesi Date: 2025-06-10 13:47:11 +0000 (Tue, 10 Jun 2025) Log Message: ----------- release notes for 2.8.2 relesase Modified Paths: -------------- trunk/ftm/distrib/ReleaseNotes.txt Modified: trunk/ftm/distrib/ReleaseNotes.txt =================================================================== --- trunk/ftm/distrib/ReleaseNotes.txt 2023-03-23 22:42:59 UTC (rev 3805) +++ trunk/ftm/distrib/ReleaseNotes.txt 2025-06-10 13:47:11 UTC (rev 3806) @@ -7,6 +7,19 @@ * ____________________________________________________ +RELEASE NOTES FTM.2.8.2 (10/06/2025) + +- cleanups of patches for Max 9 +- adaptation of gui objects default colors to color scheme change +- update of ftm.editor with matrix resize features + +____________________________________________________ +RELEASE NOTES FTM.2.8.1 (01/04/2023) + +- fixed memory not being returned +- lost reading of FLAC and Ogg files + +____________________________________________________ RELEASE NOTES FTM.2.8.0 (10/10/2022) - fixed occasional crash on load with resolve_unresolved_scopes (depending on loadbang order for scripted bpatchers) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-23 22:43:02
|
Revision: 3805 http://sourceforge.net/p/ftm/code/3805 Author: borghesi Date: 2023-03-23 22:42:59 +0000 (Thu, 23 Mar 2023) Log Message: ----------- Modified Paths: -------------- trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj Modified: trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj 2023-03-23 12:10:39 UTC (rev 3804) +++ trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj 2023-03-23 22:42:59 UTC (rev 3805) @@ -128,6 +128,8 @@ 3B1CF46C161AE679007A5AE6 /* EditorDomainRulerOwner.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B1CF46A161AE679007A5AE6 /* EditorDomainRulerOwner.h */; }; 3B1CF46D161AE679007A5AE6 /* IndexChooserMarkersContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B1CF46B161AE679007A5AE6 /* IndexChooserMarkersContainer.cpp */; }; 3B3E8CB10AB81B2800EE3FAB /* ftm.guilistener.c in Sources */ = {isa = PBXBuildFile; fileRef = 3B3E8CB00AB81B2800EE3FAB /* ftm.guilistener.c */; }; + 3B446F4129C9D1540033E77C /* LassoTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B446F4029C9D1540033E77C /* LassoTool.cpp */; }; + 3B446F4329C9D15E0033E77C /* SelectTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B446F4229C9D15E0033E77C /* SelectTool.cpp */; }; 3B46D2A310B566F800C927D9 /* ftm.tween.c in Sources */ = {isa = PBXBuildFile; fileRef = 3B46D2A210B566F800C927D9 /* ftm.tween.c */; }; 3B6614F71E363A1E00E5EFCC /* juce_core.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B6614F61E363A1E00E5EFCC /* juce_core.mm */; }; 3B6614F91E363A2300E5EFCC /* juce_data_structures.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B6614F81E363A2300E5EFCC /* juce_data_structures.mm */; }; @@ -478,6 +480,8 @@ 3B1CF46B161AE679007A5AE6 /* IndexChooserMarkersContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexChooserMarkersContainer.cpp; sourceTree = "<group>"; }; 3B3E8CAE0AB81AB100EE3FAB /* ftm.guilistener.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ftm.guilistener.mxo; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3E8CB00AB81B2800EE3FAB /* ftm.guilistener.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ftm.guilistener.c; sourceTree = "<group>"; }; + 3B446F4029C9D1540033E77C /* LassoTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LassoTool.cpp; sourceTree = "<group>"; }; + 3B446F4229C9D15E0033E77C /* SelectTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectTool.cpp; sourceTree = "<group>"; }; 3B46D2A210B566F800C927D9 /* ftm.tween.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ftm.tween.c; sourceTree = "<group>"; }; 3B6614F41E363A0E00E5EFCC /* juce_opengl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_opengl.mm; path = ../../../components/juce/JuceLibraryCode/juce_opengl.mm; sourceTree = "<group>"; }; 3B6614F61E363A1E00E5EFCC /* juce_core.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_core.mm; path = ../../../components/juce/JuceLibraryCode/juce_core.mm; sourceTree = "<group>"; }; @@ -914,15 +918,17 @@ 3BE1ACD6136EB1930036CFFC /* tools */ = { isa = PBXGroup; children = ( - 3BDD70BF1677718700D97963 /* LockTool.cpp */, - 3BE8610D14F2B308001ADBD0 /* EditorToolListener.h */, 3BE1ACD7136EB1AF0036CFFC /* CursorTool.cpp */, 3BE1ACD8136EB1AF0036CFFC /* DrawTool.cpp */, + 3BE8610D14F2B308001ADBD0 /* EditorToolListener.h */, 3BE1ACD9136EB1AF0036CFFC /* EditorTool.h */, 3BE1ACDA136EB1AF0036CFFC /* EditTool.cpp */, + 3B446F4029C9D1540033E77C /* LassoTool.cpp */, + 3BDD70BF1677718700D97963 /* LockTool.cpp */, 3BE1ACDB136EB1AF0036CFFC /* RegionTool.cpp */, 3BE1ACDC136EB1AF0036CFFC /* ScrollZoomListener.h */, 3BE1ACDD136EB1AF0036CFFC /* ScrollZoomTool.cpp */, + 3B446F4229C9D15E0033E77C /* SelectTool.cpp */, ); path = tools; sourceTree = "<group>"; @@ -2698,6 +2704,7 @@ 3BE1AC97136EB14D0036CFFC /* EditorContainer.cpp in Sources */, 3BE1AC9A136EB14D0036CFFC /* EditorDomainRuler.cpp in Sources */, 21DD1AFC1D9B137900476592 /* SplineEditor.cpp in Sources */, + 3B446F4329C9D15E0033E77C /* SelectTool.cpp in Sources */, 3B6614F91E363A2300E5EFCC /* juce_data_structures.mm in Sources */, 3BE1AC9C136EB14D0036CFFC /* EditorDomainScrollbar.cpp in Sources */, 3B6614F71E363A1E00E5EFCC /* juce_core.mm in Sources */, @@ -2710,6 +2717,7 @@ 3BE1ACAA136EB14D0036CFFC /* EditorToolbar.cpp in Sources */, 3BE1ACAE136EB14D0036CFFC /* IndexChooser.cpp in Sources */, 3B6614FD1E363A3000E5EFCC /* juce_graphics.mm in Sources */, + 3B446F4129C9D1540033E77C /* LassoTool.cpp in Sources */, 3BE1ACB2136EB14D0036CFFC /* ViewScrollBar.cpp in Sources */, 3BE1ACC4136EB1730036CFFC /* MarkersEditor.cpp in Sources */, 3BE1ACC5136EB1730036CFFC /* MatrixEditor.cpp in Sources */, @@ -3026,7 +3034,7 @@ INFOPLIST_FILE = ftmexternal.plist; JS_DIR = ../../../../components/js; JUCE_DIR = "$(COMPONENTS_DIR)/juce"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -3745,7 +3753,7 @@ INFOPLIST_FILE = ftmexternal.plist; JS_DIR = ../../../../components/js; JUCE_DIR = "$(COMPONENTS_DIR)/juce"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -4235,7 +4243,7 @@ INFOPLIST_FILE = ftmexternal.plist; JS_DIR = ../../../../components/js; JUCE_DIR = "$(COMPONENTS_DIR)/juce"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -4313,7 +4321,7 @@ INFOPLIST_FILE = ftmexternal.plist; JS_DIR = ../../../../components/js; JUCE_DIR = "$(COMPONENTS_DIR)/juce"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -4416,7 +4424,7 @@ INFOPLIST_FILE = ftmexternal.plist; JS_DIR = ../../../../components/js; JUCE_DIR = "$(COMPONENTS_DIR)/juce"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_CODE_SIGN_FLAGS = "--timestamp"; Modified: trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2023-03-23 12:10:39 UTC (rev 3804) +++ trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2023-03-23 22:42:59 UTC (rev 3805) @@ -2730,7 +2730,7 @@ ); JUCE_DIR = "$(COMPONENTS_DIR)/juce"; LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -2950,7 +2950,7 @@ ); JUCE_DIR = "$(COMPONENTS_DIR)/juce"; LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -3026,7 +3026,7 @@ ); JUCE_DIR = "$(COMPONENTS_DIR)/juce"; LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( @@ -3183,7 +3183,7 @@ ); JUCE_DIR = "$(COMPONENTS_DIR)/juce"; LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_CODE_SIGN_FLAGS = "--timestamp"; @@ -3534,7 +3534,7 @@ ); JUCE_DIR = "$(COMPONENTS_DIR)/juce"; LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-23 12:10:42
|
Revision: 3804 http://sourceforge.net/p/ftm/code/3804 Author: borghesi Date: 2023-03-23 12:10:39 +0000 (Thu, 23 Mar 2023) Log Message: ----------- update of visual studio projects for windows compilation Modified Paths: -------------- trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj.filters trunk/ftm/build/max5/winxp-vs/ftm.sln trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj.user Modified: trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj =================================================================== --- trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj 2023-03-23 12:09:01 UTC (rev 3803) +++ trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj 2023-03-23 12:10:39 UTC (rev 3804) @@ -847,9 +847,11 @@ <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\CursorTool.cpp" /> <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\DrawTool.cpp" /> <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\EditTool.cpp" /> + <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\LassoTool.cpp" /> <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\LockTool.cpp" /> <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\RegionTool.cpp" /> <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\ScrollZoomTool.cpp" /> + <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\SelectTool.cpp" /> <ClCompile Include="..\..\..\..\components\juce\JuceLibraryCode\juce_core.cpp" /> <ClCompile Include="..\..\..\..\components\juce\JuceLibraryCode\juce_data_structures.cpp" /> <ClCompile Include="..\..\..\..\components\juce\JuceLibraryCode\juce_events.cpp" /> Modified: trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj.filters =================================================================== --- trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj.filters 2023-03-23 12:09:01 UTC (rev 3803) +++ trunk/ftm/build/max5/winxp-vs/ftm.editor.vcxproj.filters 2023-03-23 12:10:39 UTC (rev 3804) @@ -2752,5 +2752,11 @@ <ClCompile Include="..\..\..\..\components\ImtrEditor\src\editors\SummaryEditor.cpp"> <Filter>Source Files\editors</Filter> </ClCompile> + <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\LassoTool.cpp"> + <Filter>Source Files\tools</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\components\ImtrEditor\src\tools\SelectTool.cpp"> + <Filter>Source Files\tools</Filter> + </ClCompile> </ItemGroup> </Project> \ No newline at end of file Modified: trunk/ftm/build/max5/winxp-vs/ftm.sln =================================================================== --- trunk/ftm/build/max5/winxp-vs/ftm.sln 2023-03-23 12:09:01 UTC (rev 3803) +++ trunk/ftm/build/max5/winxp-vs/ftm.sln 2023-03-23 12:10:39 UTC (rev 3804) @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30523.141 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ftmlib", "ftmlib.vcxproj", "{7C862DF9-D4A6-400C-A62A-7E72F42B89FA}" EndProject @@ -299,4 +299,7 @@ GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DD7A6A6C-881A-4CBF-8621-0478753D8E2C} + EndGlobalSection EndGlobal Modified: trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj =================================================================== --- trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj 2023-03-23 12:09:01 UTC (rev 3803) +++ trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj 2023-03-23 12:10:39 UTC (rev 3804) @@ -78,6 +78,7 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>$(ProjectName)64</TargetName> + <OutDir>C:\Users\borgh\Documents\Max 8\Packages\FTM\support\</OutDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>$(ProjectName)64</TargetName> @@ -142,9 +143,9 @@ <MinimalRebuild>true</MinimalRebuild> </ClCompile> <Link> - <AdditionalDependencies>sdifd.lib;libsndfile-1.lib;pthreadVC2.lib;MaxAPI.lib;MaxAudio.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>sdif.lib;libsndfile-1.lib;pthreadVC2.lib;MaxAPI.lib;MaxAudio.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>..\..\..\..\components\sdif\win-x64;..\..\..\..\components\sndfile\win-x64;..\..\..\..\components\pthreads\win-x64;..\..\..\..\components\maxapi\max8.2\msp-includes\x64;..\..\..\..\components\maxapi\max8.2\max-includes\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - <GenerateDebugInformation>true</GenerateDebugInformation> + <GenerateDebugInformation>DebugFull</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)ftmlib.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> Modified: trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj.user =================================================================== --- trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj.user 2023-03-23 12:09:01 UTC (rev 3803) +++ trunk/ftm/build/max5/winxp-vs/ftmlib.vcxproj.user 2023-03-23 12:10:39 UTC (rev 3804) @@ -1,3 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LocalDebuggerAttach>true</LocalDebuggerAttach> + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> + </PropertyGroup> </Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-23 12:09:04
|
Revision: 3803 http://sourceforge.net/p/ftm/code/3803 Author: borghesi Date: 2023-03-23 12:09:01 +0000 (Thu, 23 Mar 2023) Log Message: ----------- ftm.editr: minor update Modified Paths: -------------- trunk/ftm/externals/max5/ftm.editor.cpp Modified: trunk/ftm/externals/max5/ftm.editor.cpp =================================================================== --- trunk/ftm/externals/max5/ftm.editor.cpp 2023-03-23 12:07:48 UTC (rev 3802) +++ trunk/ftm/externals/max5/ftm.editor.cpp 2023-03-23 12:09:01 UTC (rev 3803) @@ -178,7 +178,7 @@ IMTREDITOR_JUCE_NAMESPACE::Colour backcolor; int multieditorMode; public : - IMTREDITOR_JUCE_NAMESPACE::ScopedPointer <EditorContainer> editorContainer; + EditorContainer *editorContainer; bool autoupdate; IMTREDITOR_JUCE_NAMESPACE::Array <fts_symbol_t> interfaces; @@ -3709,13 +3709,13 @@ fts_atom_t a[2]; snprintf(str_addr_self, strlen, "_FTM_%p", self); - snprintf(str_addr_container, strlen, "_FTM_%p", container->editorContainer.get()); + snprintf(str_addr_container, strlen, "_FTM_%p", container->editorContainer); sym_addr_self = fts_new_symbol(str_addr_self); sym_addr_container = fts_new_symbol(str_addr_container); sym_addr_self->s_thing = (object *)self; - sym_addr_container->s_thing = (object *)container->editorContainer.get(); + sym_addr_container->s_thing = (object *)container->editorContainer; sym_ftm_editor->s_thing = (object *)self; fts_set_symbol(a, sym_addr_self); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-23 12:07:50
|
Revision: 3802 http://sourceforge.net/p/ftm/code/3802 Author: borghesi Date: 2023-03-23 12:07:48 +0000 (Thu, 23 Mar 2023) Log Message: ----------- ftm.editor: update of ftmdatagui Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-23 12:07:08 UTC (rev 3801) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-23 12:07:48 UTC (rev 3802) @@ -2357,7 +2357,7 @@ return mean; } static void -fm_get_means_in_range(fmat_t *mat, int start, int end, int stride, int onset, double *meanPös, double *meanNeg) +fm_get_means_in_range(fmat_t *mat, int start, int end, int stride, int onset, double *meanPos, double *meanNeg) { float *ptr = fmat_get_ptr(mat) + onset; int size = fmat_get_m(mat) * fmat_get_n(mat); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-23 12:07:11
|
Revision: 3801 http://sourceforge.net/p/ftm/code/3801 Author: borghesi Date: 2023-03-23 12:07:08 +0000 (Thu, 23 Mar 2023) Log Message: ----------- fmat: fixed windows crash in _fmat_fill_varargs Modified Paths: -------------- trunk/ftm/ftmlib/classes/fmat.c Modified: trunk/ftm/ftmlib/classes/fmat.c =================================================================== --- trunk/ftm/ftmlib/classes/fmat.c 2023-03-22 15:39:04 UTC (rev 3800) +++ trunk/ftm/ftmlib/classes/fmat.c 2023-03-23 12:07:08 UTC (rev 3801) @@ -1965,6 +1965,8 @@ fts_atom_t *col_ptr; int i, j; + fts_set_void(&ret); + expr_lock(expr); fts_hashtable_init(&locals, FTS_HASHTABLE_SMALL); @@ -1988,7 +1990,7 @@ { fts_set_int(col_ptr, j); - fts_atom_void(&ret); + fts_atom_void(&ret); expr_evaluate(expr, &locals, ac - 1, at + 1, &ret); if(fts_is_number(&ret)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-22 15:39:06
|
Revision: 3800 http://sourceforge.net/p/ftm/code/3800 Author: borghesi Date: 2023-03-22 15:39:04 +0000 (Wed, 22 Mar 2023) Log Message: ----------- Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-21 15:22:32 UTC (rev 3799) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-22 15:39:04 UTC (rev 3800) @@ -465,6 +465,53 @@ return 0; } +static void * +fts_get_object_for_buffer_default(void *obj, void *context, int objectIndex, int bufferIndex) +{ + return obj; +} + +static double +fts_get_progress_for_buffer_default(void *obj, void *context, int objectIndex, int bufferIndex) +{ + return -1.0f; +} + +static int +fts_get_original_display_order_default(void *obj, void *context, int hasAudioBuffer) +{ + return -1; +} + +static int +fts_is_time_tagged_default(void *obj, void *context) +{ + return 0; +} + +static int +sequence_gui_is_time_tagged_default(void *obj, void *context) +{ + return 1; +} + +static int +track_gui_is_time_tagged_default(void *obj, void *context) +{ + return 1; +} + +static void * +fts_get_interface_by_name_default(void *obj, void *context, const char *name) +{ + return fts_object_get_gui_interface((fts_object_t *)obj, gensym(name)); +} + +static void +fts_get_initial_interfaces_default(void *obj, void *context, int *ac, const char *interfaces[]) +{ + *ac = 0; +} #pragma mark Bpf: BPF interface /************************************************************ * @@ -551,6 +598,12 @@ return NULL; } +static int +bpf_gui_is_time_tagged(void *obj, void *context) +{ + return true; +} + static void bpf_gui_bpf_install(void) { @@ -569,6 +622,13 @@ ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getRing = NULL; ((imtr_guiInterface *)&bpf_gui_interface_bpf)->setRingOffset = NULL; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getIndexInRing = NULL; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&bpf_gui_interface_bpf)->isTimeTagged = bpf_gui_is_time_tagged; bpf_gui_interface_bpf.getSize = bpf_gui_bpf_get_size; bpf_gui_interface_bpf.getPoint = bpf_gui_bpf_get_point; @@ -729,6 +789,13 @@ ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&bpf_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&bpf_gui_interface_matrix)->isTimeTagged = bpf_gui_is_time_tagged; bpf_gui_interface_matrix.getMatrixConfig = bpf_gui_matrix_get_matrix_config; bpf_gui_interface_matrix.getRows = bpf_gui_matrix_get_rows; @@ -997,6 +1064,13 @@ ((imtr_guiInterface *)&dict_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&dict_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&dict_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&dict_gui_interface_matrix)->isTimeTagged = fts_is_time_tagged_default; dict_gui_interface_matrix.getMatrixConfig = dict_gui_matrix_get_matrix_config; dict_gui_interface_matrix.getRows = dict_gui_matrix_get_rows; @@ -1482,6 +1556,13 @@ ((imtr_guiInterface *)&mat_gui_interface_markers)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&mat_gui_interface_markers)->getRing = NULL; ((imtr_guiInterface *)&mat_gui_interface_markers)->setRingOffset = NULL; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getIndexInRing = NULL; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&mat_gui_interface_markers)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&mat_gui_interface_markers)->isTimeTagged = fts_is_time_tagged_default; mat_gui_interface_markers.isVector = mat_gui_markers_is_vector; mat_gui_interface_markers.getSize = mat_gui_markers_get_size; @@ -1905,6 +1986,13 @@ ((imtr_guiInterface *)&mat_gui_interface_score)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&mat_gui_interface_score)->getRing = NULL; ((imtr_guiInterface *)&mat_gui_interface_score)->setRingOffset = NULL; + ((imtr_guiInterface *)&mat_gui_interface_score)->getIndexInRing = NULL; + ((imtr_guiInterface *)&mat_gui_interface_score)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_score)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_score)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&mat_gui_interface_score)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&mat_gui_interface_score)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&mat_gui_interface_score)->isTimeTagged = fts_is_time_tagged_default; mat_gui_interface_score.isVector = mat_gui_score_is_vector; mat_gui_interface_score.getSize = mat_gui_score_get_size; @@ -2168,6 +2256,13 @@ ((imtr_guiInterface *)&mat_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&mat_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&mat_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&mat_gui_interface_matrix)->isTimeTagged = fts_is_time_tagged_default; mat_gui_interface_matrix.getMatrixConfig = mat_gui_matrix_get_matrix_config; mat_gui_interface_matrix.getRows = mat_gui_matrix_get_rows; @@ -2535,6 +2630,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_fvec)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_fvec)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_fvec.getSize = fmat_gui_wave_get_size; fmat_gui_interface_fvec.getStep = fmat_gui_wave_get_step; @@ -2572,7 +2674,14 @@ ((imtr_guiInterface *)&fmat_gui_interface_wave)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_wave)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_wave)->setRingOffset = NULL; - + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_wave)->isTimeTagged = fts_is_time_tagged_default; + fmat_gui_interface_wave.getSize = fmat_gui_wave_get_size; fmat_gui_interface_wave.getStep = fmat_gui_wave_get_step; fmat_gui_interface_wave.getPointer = fmat_gui_wave_get_ptr; @@ -2785,6 +2894,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_multiwave)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_multiwave.getWavesNum = fmat_gui_multiwave_get_waves_num; fmat_gui_interface_multiwave.getSize = fmat_gui_multiwave_get_size; @@ -3005,6 +3121,12 @@ ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->isTimeTagged = fmat_gui_sonogram_is_timetagged; fmat_gui_interface_sonogram.getLength = fmat_gui_sonogram_get_length; @@ -3358,6 +3480,12 @@ ((imtr_guiInterface *)&fmat_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_traces)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&fmat_gui_interface_traces)->isTimeTagged = fmat_gui_traces_is_time_tagged; fmat_gui_interface_traces.isVector = fmat_gui_traces_is_vector; @@ -3566,6 +3694,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_pixels)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_pixels)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_pixels.getLength = fmat_gui_pixels_get_length; fmat_gui_interface_pixels.getSize = fmat_gui_pixels_get_size; @@ -3734,6 +3869,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_bpf)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_bpf)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_bpf.getSize = fmat_gui_bpf_get_size; fmat_gui_interface_bpf.getPoint = fmat_gui_bpf_get_point; @@ -3984,6 +4126,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_multibpf)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_multibpf.getSize = fmat_gui_multibpf_get_size; fmat_gui_interface_multibpf.getBpfNum = fmat_gui_multibpf_get_bpf_num; @@ -4143,6 +4292,13 @@ ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fmat_gui_interface_matrix)->isTimeTagged = fts_is_time_tagged_default; fmat_gui_interface_matrix.getMatrixConfig = fmat_gui_matrix_get_matrix_config; fmat_gui_interface_matrix.getRows = fmat_gui_matrix_get_rows; @@ -4443,6 +4599,13 @@ ((imtr_guiInterface *)&fvec_gui_interface_wave)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fvec_gui_interface_wave)->getRing = NULL; ((imtr_guiInterface *)&fvec_gui_interface_wave)->setRingOffset = NULL; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fvec_gui_interface_wave)->isTimeTagged = fts_is_time_tagged_default; fvec_gui_interface_wave.getSize = fvec_gui_wave_get_size; fvec_gui_interface_wave.getStep = fvec_gui_wave_get_step; @@ -4564,6 +4727,13 @@ ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&fvec_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&fvec_gui_interface_matrix)->isTimeTagged = fts_is_time_tagged_default; fvec_gui_interface_matrix.getMatrixConfig = fvec_gui_matrix_get_matrix_config; fvec_gui_interface_matrix.getRows = fvec_gui_matrix_get_rows; @@ -4838,6 +5008,13 @@ ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_bpf)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&sequence_gui_interface_bpf)->isTimeTagged = sequence_gui_is_time_tagged_default; sequence_gui_interface_bpf.getSize = sequence_gui_bpf_get_size; sequence_gui_interface_bpf.getPoint = sequence_gui_bpf_get_point; @@ -5615,6 +5792,13 @@ ((imtr_guiInterface *)&sequence_gui_interface_markers)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_markers)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_markers)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&sequence_gui_interface_markers)->isTimeTagged = sequence_gui_is_time_tagged_default; sequence_gui_interface_markers.isVector = sequence_gui_markers_is_vector; sequence_gui_interface_markers.getSize = sequence_gui_markers_get_size; @@ -5959,6 +6143,13 @@ ((imtr_guiInterface *)&sequence_gui_interface_score)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_score)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_score)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_score)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&sequence_gui_interface_score)->isTimeTagged = sequence_gui_is_time_tagged_default; sequence_gui_interface_score.isVector = sequence_gui_score_is_vector; sequence_gui_interface_score.getSize = sequence_gui_score_get_size; @@ -6511,8 +6702,14 @@ ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&sequence_gui_interface_matrix)->isTimeTagged = sequence_gui_is_time_tagged_default; - sequence_gui_interface_matrix.getMatrixConfig = sequence_gui_matrix_get_matrix_config; sequence_gui_interface_matrix.getRows = sequence_gui_matrix_get_rows; sequence_gui_interface_matrix.getCols = sequence_gui_matrix_get_cols; @@ -6900,6 +7097,12 @@ ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->isTimeTagged = sequence_gui_sonogram_is_timetagged; sequence_gui_interface_sonogram.getLength = sequence_gui_sonogram_get_length; @@ -7316,6 +7519,12 @@ ((imtr_guiInterface *)&sequence_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_traces)->setRingOffset = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getIndexInRing = NULL; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&sequence_gui_interface_traces)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&sequence_gui_interface_traces)->isTimeTagged = sequence_gui_traces_is_time_tagged; sequence_gui_interface_traces.isVector = sequence_gui_traces_is_vector; @@ -7605,6 +7814,13 @@ ((imtr_guiInterface *)&track_gui_interface_bpf)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_bpf)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_bpf)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_bpf)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&track_gui_interface_bpf)->isTimeTagged = track_gui_is_time_tagged_default; track_gui_interface_bpf.getSize = track_gui_bpf_get_size; track_gui_interface_bpf.getPoint = track_gui_bpf_get_point; @@ -7963,6 +8179,12 @@ ((imtr_guiInterface *)&track_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_sonogram)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&track_gui_interface_sonogram)->isTimeTagged = track_gui_sonogram_is_timetagged; track_gui_interface_sonogram.getLength = track_gui_sonogram_get_length; @@ -8362,6 +8584,12 @@ ((imtr_guiInterface *)&track_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_traces)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_traces)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_traces)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_traces)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_traces)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_traces)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_traces)->getInterfaceByName = fts_get_interface_by_name_default; ((imtr_guiInterface *)&track_gui_interface_traces)->isTimeTagged = track_gui_traces_is_time_tagged; track_gui_interface_traces.isVector = track_gui_traces_is_vector; @@ -8658,6 +8886,13 @@ ((imtr_guiInterface *)&track_gui_interface_score)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_score)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_score)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_score)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_score)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_score)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_score)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_score)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_score)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&track_gui_interface_score)->isTimeTagged = track_gui_is_time_tagged_default; track_gui_interface_score.isVector = track_gui_score_is_vector; track_gui_interface_score.getSize = track_gui_score_get_size; @@ -9457,6 +9692,13 @@ ((imtr_guiInterface *)&track_gui_interface_markers)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_markers)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_markers)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_markers)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_markers)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_markers)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_markers)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_markers)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_markers)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&track_gui_interface_markers)->isTimeTagged = track_gui_is_time_tagged_default; track_gui_interface_markers.isVector = track_gui_markers_is_vector; track_gui_interface_markers.getSize = track_gui_markers_get_size; @@ -9989,6 +10231,13 @@ ((imtr_guiInterface *)&track_gui_interface_matrix)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_matrix)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_matrix)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getIndexInRing = NULL; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getObjectForBuffer = fts_get_object_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getProgressForBuffer = fts_get_progress_for_buffer_default; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getOriginalDisplayOrder = fts_get_original_display_order_default; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getInitialInterfaces = fts_get_initial_interfaces_default; + ((imtr_guiInterface *)&track_gui_interface_matrix)->getInterfaceByName = fts_get_interface_by_name_default; + ((imtr_guiInterface *)&track_gui_interface_matrix)->isTimeTagged = fts_is_time_tagged_default; track_gui_interface_matrix.getMatrixConfig = track_gui_matrix_get_matrix_config; track_gui_interface_matrix.getRows = track_gui_matrix_get_rows; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-21 15:22:34
|
Revision: 3799 http://sourceforge.net/p/ftm/code/3799 Author: borghesi Date: 2023-03-21 15:22:32 +0000 (Tue, 21 Mar 2023) Log Message: ----------- Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-21 12:36:23 UTC (rev 3798) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-21 15:22:32 UTC (rev 3799) @@ -2642,7 +2642,7 @@ } static void -fmat_gui_multiwave_get_min_max_mean(void *obj, void *context, int waveIndex, int rangeStartIndex, int rangeSize, double *min, double *max, double *meanPos, double *meanNeg) +fmat_gui_multiwave_get_min_max_mean(void *obj, void *context, int index, int rangeStartIndex, int rangeSize, double *min, double *max, double *meanPos, double *meanNeg) { fmat_t *self = (fmat_t *)obj; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-21 12:36:26
|
Revision: 3798 http://sourceforge.net/p/ftm/code/3798 Author: borghesi Date: 2023-03-21 12:36:23 +0000 (Tue, 21 Mar 2023) Log Message: ----------- update of ftm.editor Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c trunk/ftm/ftmlib/classes/fvec.c trunk/ftm/ftmlib/classes/fvec.h Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-20 17:39:52 UTC (rev 3797) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-21 12:36:23 UTC (rev 3798) @@ -1044,8 +1044,7 @@ } static void -mat_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, - int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex) +mat_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, const char *activeColName, int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex, int *activeColIndex) { mat_t *self = (mat_t *)obj; fts_schema_t *colschema = mat_get_schema(self, 2); @@ -1058,6 +1057,7 @@ *durationColIndex = fts_schema_get_index(colschema, fts_new_symbol(durationColName)); *offsetColIndex = fts_schema_get_index(colschema, fts_new_symbol(offsetColName)); *colorColIndex = fts_schema_get_index(colschema, fts_new_symbol(colorColName)); + *activeColIndex = fts_schema_get_index(colschema, fts_new_symbol(activeColName)); } else { @@ -1067,6 +1067,7 @@ *cue2ColIndex = (self->n > 4) ? 4 : -1; *labelColIndex = (self->n > 5) ? 5 : -1; *colorColIndex = -1; + *activeColIndex = -1; } } @@ -1110,7 +1111,7 @@ } static void * -mat_gui_markers_get_by_index(void *obj, void *context, int index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +mat_gui_markers_get_by_index(void *obj, void *context, int index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { mat_t *self = (mat_t *)obj; int m = mat_get_m(self); @@ -1169,7 +1170,12 @@ val = mat_get_element( self, index, colorColIndex); if(fts_is_number(val)) *color = (double)fts_get_number_float(val); } - + /* active */ + if(activeColIndex > 0) + { + val = mat_get_element( self, index, activeColIndex); + if(fts_is_number(val)) *active = (double)fts_get_number_float(val); + } mat_unlock(self); } return NULL; @@ -1199,8 +1205,8 @@ } static void * -mat_gui_markers_add(void *obj, void *context, double time, double duration, double offset, double cue, double cue2, const char *label, double color, - int *ret_index, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +mat_gui_markers_add(void *obj, void *context, double time, double duration, double offset, double cue, double cue2, const char *label, double color, double active, int *ret_index, + int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { mat_t *self = (mat_t *)obj; int m = mat_get_m(self); @@ -1258,6 +1264,12 @@ fts_set_float(&k, color); mat_set_element(self, i, colorColIndex, &k); } + + if(activeColIndex > 0) + { + fts_set_float(&k, active); + mat_set_element(self, i, activeColIndex, &k); + } mat_unlock(self); fts_set_symbol(&k, fts_s_add); @@ -1268,7 +1280,7 @@ } static int -mat_gui_markers_move(void *obj, void *context, void *evt, int index, double time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +mat_gui_markers_move(void *obj, void *context, void *marker, int index, double time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { mat_t *self = (mat_t *)obj; int m = mat_get_m(self); @@ -2249,6 +2261,41 @@ } return mean; } +static void +fm_get_means_in_range(fmat_t *mat, int start, int end, int stride, int onset, double *meanPös, double *meanNeg) +{ + float *ptr = fmat_get_ptr(mat) + onset; + int size = fmat_get_m(mat) * fmat_get_n(mat); + float vmeanPos = 0.0f; + int numPos = 0; + float vmeanNeg = 0.0f; + int numNeg = 0; + float val; + if(size > 0) + { + int i; + if(end > size) + end = size; + + for (i=start*stride; i<end*stride; i+=stride) + { + val = ptr[i]; + if(val >= 0) + { + vmeanPos += val*val; + numPos++; + } + else + { + vmeanNeg += val*val; + numNeg++; + } + } + *meanNeg = (numNeg > 0) ? -sqrt(vmeanNeg/numNeg) : 0; + *meanNeg = (numNeg > 0) ? -sqrt(vmeanNeg/numNeg) : 0; + } +} + static int fmat_gui_wave_get_size(void *obj, void *context) { @@ -2285,7 +2332,7 @@ } static void -fmat_gui_wave_get_min_max_mean(void *obj, void *context, int onset, int rangeStartIndex, int rangeSize, double *min, double *max, double *mean) +fmat_gui_wave_get_min_max_mean(void *obj, void *context, int onset, int rangeStartIndex, int rangeSize, double *min, double *max, double *meanPos, double *meanNeg) { fmat_t *self = (fmat_t *)obj; int size = self->m * self->n; @@ -2296,7 +2343,8 @@ fmat_lock(self); *max = fm_get_max_value_in_range(self, start, end, self->n, onset); *min = fm_get_min_value_in_range(self, start, end, self->n, onset); - *mean = fm_get_mean_value_in_range(self, start, end, self->n, onset); + fm_get_means_in_range(self, start, end, self->n, onset, meanPos, meanNeg); + fmat_unlock(self); } } @@ -2594,7 +2642,7 @@ } static void -fmat_gui_multiwave_get_min_max_mean(void *obj, void *context, int index, int rangeStartIndex, int rangeSize, double *min, double *max, double *mean) +fmat_gui_multiwave_get_min_max_mean(void *obj, void *context, int waveIndex, int rangeStartIndex, int rangeSize, double *min, double *max, double *meanPos, double *meanNeg) { fmat_t *self = (fmat_t *)obj; @@ -2604,7 +2652,7 @@ fmat_lock(self); *min = fm_get_min_value_in_range(self, start, end, self->n, index); *max = fm_get_max_value_in_range(self, start, end, self->n, index); - *mean = fm_get_mean_value_in_range(self, start, end, self->n, index); + fm_get_means_in_range(self, start, end, self->n, index, meanPos, meanNeg); fmat_unlock(self); } @@ -2782,7 +2830,7 @@ } static void -fmat_gui_sonogram_get_values(void *obj, void *context, int *rows, int *cols, float **ptr, double **timeTags, int *ringIndex, int *ringSize, int *ringTale) +fmat_gui_sonogram_get_values(void *obj, void *context, int *rows, int *cols, float **ptr, double **timeTags, int *ringIndex, int *ringSize, int *ringTail, double *ringOffset) { fmat_t *self = (fmat_t *)obj; @@ -2792,7 +2840,8 @@ *cols = self->n; *ringIndex = -1; *ringSize = 0; - *ringTale = 0; + *ringTail = 0; + *ringOffset = 0; } static void @@ -4149,7 +4198,7 @@ } static void -fvec_gui_wave_get_min_max_mean(void *obj, void *context, int onset, int rangeStartIndex, int rangeSize, double *min, double *max, double *mean) +fvec_gui_wave_get_min_max_mean(void *obj, void *context, int onset, int rangeStartIndex, int rangeSize, double *min, double *max, double *meanPos, double *meanNeg) { fvec_t *self = (fvec_t *)obj; float *p; @@ -4156,7 +4205,8 @@ int size, stride; float vmax = -FLT_MAX; float vmin = FLT_MAX; - float vmean = 0.0; + float vmeanPos = 0.0; + float vmeanNeg = 0.0; fvec_vector_lock(self, &p, &size, &stride); if(size > 0) @@ -4163,13 +4213,14 @@ { vmin = fvec_vector_get_min_in_range(p, size, stride, rangeStartIndex, rangeSize); vmax = fvec_vector_get_max_in_range(p, size, stride, rangeStartIndex, rangeSize); - vmean = fvec_vector_get_mean_in_range(p, size, stride, rangeStartIndex, rangeSize); + fvec_vector_get_means_in_range(p, size, stride, rangeStartIndex, rangeSize, &vmeanPos, &vmeanNeg); } fvec_unlock(self); *min = vmin; *max = vmax; - *mean = vmean; + *meanPos = vmeanPos; + *meanNeg = vmeanNeg; } static void @@ -4814,8 +4865,7 @@ } static void -sequence_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, - int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex) +sequence_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, const char *activeColName, int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex, int *activeColIndex) { *durationColIndex = 0; *offsetColIndex = 1; @@ -4823,6 +4873,7 @@ *cue2ColIndex = 3; *labelColIndex = 4; *colorColIndex = -1; + *activeColIndex = -1; } static int @@ -4845,7 +4896,7 @@ static void * -sequence_gui_markers_get_first(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +sequence_gui_markers_get_first(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { event_t *evt; sequence_t *self = (sequence_t *)obj; @@ -4904,6 +4955,7 @@ *offset = 0.0; *color = -1.0; + *active = 1.0; } else { @@ -4914,6 +4966,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -4922,7 +4975,7 @@ } static void * -sequence_gui_markers_get_last(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +sequence_gui_markers_get_last(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { event_t *evt; sequence_t *self = (sequence_t *)obj; @@ -4980,6 +5033,7 @@ else *offset = 0.0; *color = -1.0; + *active = 1.0; } else { @@ -4989,6 +5043,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -4997,7 +5052,7 @@ } static void * -sequence_gui_markers_get_by_index(void *obj, void *context, int the_index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +sequence_gui_markers_get_by_index(void *obj, void *context, int the_index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { event_t *evt; sequence_t *self = (sequence_t *)obj; @@ -5055,6 +5110,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -5065,6 +5128,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -5091,7 +5155,7 @@ } static void * -sequence_gui_markers_get_next(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +sequence_gui_markers_get_next(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = (sequence_t *)obj; event_t *evt; @@ -5146,9 +5210,17 @@ if(fts_is_number(&ret)) *offset = (double)fts_get_number_float(&ret); else - *offset = -0.0; + *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -5159,6 +5231,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -5167,7 +5240,7 @@ } static void * -sequence_gui_markers_get_previous(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +sequence_gui_markers_get_previous(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = (sequence_t *)obj; event_t *evt; @@ -5225,6 +5298,14 @@ *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -5235,6 +5316,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -5244,7 +5326,7 @@ static void * -sequence_gui_markers_get_event(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +sequence_gui_markers_get_event(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = (sequence_t *)obj; event_t *evt; @@ -5301,6 +5383,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 0.0; } else { @@ -5311,6 +5401,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -5319,8 +5410,8 @@ } static void * -sequence_gui_markers_add(void *obj, void *context, double the_time, double duration, double offset, double cue, double cue2, const char *label, double color, int *ret_index, - int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +sequence_gui_markers_add(void *obj, void *context, double the_time, double duration, double offset, double cue, double cue2, const char *label, double color, double active, int *ret_index, + int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { sequence_t *self = (sequence_t *)obj; event_t *evt = NULL; @@ -5360,6 +5451,9 @@ fts_set_float(&a, offset); event_set_property(evt, fts_s_offset, &a); + fts_set_float(&a, active); + event_set_property(evt, fts_s_active, &a); + sequence_unlock(self); fts_set_symbol(&a, fts_s_add); @@ -5370,7 +5464,7 @@ } static int -sequence_gui_markers_move(void *obj, void *context, void *evt, int index, double the_time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +sequence_gui_markers_move(void *obj, void *context, void *evt, int index, double the_time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { sequence_t *self = (sequence_t *)obj; sequence_lock_write(self); @@ -8621,7 +8715,7 @@ } static void -track_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex) +track_gui_markers_get_column_indexes(void *obj, void *context, const char *durationColName, const char *offsetColName, const char *cueColName, const char *cue2ColName, const char *labelColName, const char *colorColName, const char *activeColName, int *durationColIndex, int *offsetColIndex, int *cueColIndex, int *cue2ColIndex, int *labelColIndex, int *colorColIndex, int *activeColIndex) { *durationColIndex = 0; *offsetColIndex = 1; @@ -8629,10 +8723,11 @@ *cue2ColIndex = 3; *labelColIndex = 4; *colorColIndex = -1; + *activeColIndex = -1; } static void * -track_gui_markers_get_first(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +track_gui_markers_get_first(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { event_t *evt; sequence_t *self = track_get_events((track_t *)obj); @@ -8691,6 +8786,14 @@ *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -8701,6 +8804,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -8709,7 +8813,7 @@ } static void * -track_gui_markers_get_last(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +track_gui_markers_get_last(void *obj, void *context, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { event_t *evt; sequence_t *self = track_get_events((track_t *)obj); @@ -8767,6 +8871,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -8777,6 +8889,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -8785,7 +8898,7 @@ } static void * -track_gui_markers_get_by_index(void *obj, void *context, int the_index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +track_gui_markers_get_by_index(void *obj, void *context, int the_index, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { event_t *evt; sequence_t *self = track_get_events((track_t *)obj); @@ -8843,6 +8956,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -8853,6 +8974,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -8879,7 +9001,7 @@ } static void * -track_gui_markers_get_next(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +track_gui_markers_get_next(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = track_get_events((track_t *)obj); event_t *evt; @@ -8936,6 +9058,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -8946,6 +9076,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -8954,7 +9085,7 @@ } static void * -track_gui_markers_get_previous(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +track_gui_markers_get_previous(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = track_get_events((track_t *)obj); event_t *evt; @@ -9011,6 +9142,14 @@ else *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -9021,6 +9160,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -9029,7 +9169,7 @@ } static void * -track_gui_markers_get_event(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color) +track_gui_markers_get_event(void *obj, void *context, void *marker, double *time, double *duration, double *offset, double *cue, double *cue2, char **label, double *color, double *active) { sequence_t *self = track_get_events((track_t *)obj); event_t *evt; @@ -9087,6 +9227,14 @@ *offset = 0.0; *color = -1.0; + + /* active */ + fts_set_void(&ret); + event_get_property(evt, fts_s_active, &ret); + if(fts_is_number(&ret)) + *active = (double)fts_get_number_float(&ret); + else + *active = 1.0; } else { @@ -9097,6 +9245,7 @@ *duration = 0.0; *offset = 0.0; *color = -1.0; + *active = 1.0; } sequence_unlock(self); @@ -9105,8 +9254,8 @@ } static void * -track_gui_markers_add(void *obj, void *context, double the_time, double duration, double offset, double cue, double cue2, const char *label, double color, int *ret_index, - int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +track_gui_markers_add(void *obj, void *context, double the_time, double duration, double offset, double cue, double cue2, const char *label, double color, double active, int *ret_index, + int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { sequence_t *self = track_get_events((track_t *)obj); event_t *evt = NULL; @@ -9146,6 +9295,9 @@ fts_set_float(&a, offset); event_set_property(evt, fts_s_offset, &a); + fts_set_float(&a, active); + event_set_property(evt, fts_s_active, &a); + sequence_unlock(self); fts_set_symbol(&a, fts_s_add); @@ -9156,7 +9308,7 @@ } static int -track_gui_markers_move(void *obj, void *context, void *evt, int index, double the_time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex) +track_gui_markers_move(void *obj, void *context, void *evt, int index, double the_time, int durationColIndex, int offsetColIndex, int cueColIndex, int cue2ColIndex, int labelColIndex, int colorColIndex, int activeColIndex) { sequence_t *self = track_get_events((track_t *)obj); sequence_lock_write(self); @@ -10044,11 +10196,11 @@ static void fmat_gui_scatterplot_get_nodes_column_indexes(void *obj, void *context, const char *xColName, const char *yColName, const char *widthColName, const char *heightColName, const char *fixedWidthColName, const char *fixedHeightColName, const char *angleColName, - const char *edgeColorColName, const char *edgeOpacityColName, const char *fillColorColName, const char *fillOpacityColName, const char *typeColName, + const char *edgeColorColName, const char *edgeOpacityColName, const char *fillColorColName, const char *fillOpacityColName, const char *typeColName, const char *activeColName, const char *labelTextColName, const char *labelXOffsetColName, const char *labelYOffsetColName, const char *labelPositionColName, const char *labelColorColName, const char *labelOpacityColName, const char *labelFontSizeColName, const char *labelFontStyleColName, int *xColIndex, int *yColIndex, int *widthColIndex, int *heightColIndex, int *fixedWidthColIndex, int *fixedHeightColIndex, int *angleColIndex, - int *edgeColorColIndex, int *edgeOpacityColIndex, int *fillColorColIndex, int *fillOpacityColIndex, int *typeColIndex, + int *edgeColorColIndex, int *edgeOpacityColIndex, int *fillColorColIndex, int *fillOpacityColIndex, int *typeColIndex, int *activeColIndex, int *labelTextColIndex, int *labelXOffsetColIndex, int *labelYOffsetColIndex, int *labelPositionColIndex, int *labelColorColIndex, int *labelOpacityColIndex, int *labelFontSizeColIndex, int *labelFontStyleColIndex) { @@ -10069,6 +10221,7 @@ *fillColorColIndex = fts_schema_get_index(colschema, fts_new_symbol(fillColorColName)); *fillOpacityColIndex = fts_schema_get_index(colschema, fts_new_symbol(fillOpacityColName)); *typeColIndex = fts_schema_get_index(colschema, fts_new_symbol(typeColName)); + *activeColIndex = fts_schema_get_index(colschema, fts_new_symbol(activeColName)); *labelTextColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelTextColName)); *labelXOffsetColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelXOffsetColName)); *labelYOffsetColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelYOffsetColName)); @@ -10092,6 +10245,7 @@ *fillColorColIndex = -1; *fillOpacityColIndex = -1; *typeColIndex = -1; + *activeColIndex = -1; *labelTextColIndex = -1; *labelXOffsetColIndex = -1; *labelYOffsetColIndex = -1; @@ -10104,7 +10258,8 @@ } static void -fmat_gui_scatterplot_get_point(void *obj, void *context, int index, double *posx, double *posy, double *width, double *height, double *angle, double *markerType, int xColIndex, int yColIndex, int widthColIndex, int heightColIndex, int angleColIndex, int typeColIndex) +fmat_gui_scatterplot_get_point(void *obj, void *context, int index, double *posx, double *posy, double *width, double *height, double *angle, double *markerType, double *active, + int xColIndex, int yColIndex, int widthColIndex, int heightColIndex, int angleColIndex, int typeColIndex, int activeColIndex) { fmat_t *self = (fmat_t *)obj; @@ -10131,6 +10286,9 @@ if(typeColIndex >= 0 && typeColIndex < self->n) *markerType = fmat_get_element(self, index, typeColIndex); + if(activeColIndex >= 0 && activeColIndex < self->n) + *active = fmat_get_element(self, index, activeColIndex); + fmat_unlock(self); } @@ -10454,13 +10612,13 @@ } static void -mat_gui_scatterplot_get_nodes_column_indexes(void *obj, void *context, const char *xColName, const char *yColName, const char *widthColName, const char *heightColName, +mat_gui_scatterplot_get_nodes_column_indexes(void *obj, void *context, const char *xColName, const char *yColName, const char *widthColName, const char *heightColName, const char *fixedWidthColName, const char *fixedHeightColName, const char *angleColName, - const char *edgeColorColName, const char *edgeOpacityColName, const char *fillColorColName, const char *fillOpacityColName, const char *typeColName, + const char *edgeColorColName, const char *edgeOpacityColName, const char *fillColorColName, const char *fillOpacityColName, const char *typeColName, const char *activeColName, const char *labelTextColName, const char *labelXOffsetColName, const char *labelYOffsetColName, const char *labelPositionColName, const char *labelColorColName, const char *labelOpacityColName, const char *labelFontSizeColName, const char *labelFontStyleColName, int *xColIndex, int *yColIndex, int *widthColIndex, int *heightColIndex, int *fixedWidthColIndex, int *fixedHeightColIndex, int *angleColIndex, - int *edgeColorColIndex, int *edgeOpacityColIndex, int *fillColorColIndex, int *fillOpacityColIndex, int *typeColIndex, + int *edgeColorColIndex, int *edgeOpacityColIndex, int *fillColorColIndex, int *fillOpacityColIndex, int *typeColIndex, int *activeColIndex, int *labelTextColIndex, int *labelXOffsetColIndex, int *labelYOffsetColIndex, int *labelPositionColIndex, int *labelColorColIndex, int *labelOpacityColIndex, int *labelFontSizeColIndex, int *labelFontStyleColIndex) { @@ -10481,6 +10639,7 @@ *fillColorColIndex = fts_schema_get_index(colschema, fts_new_symbol(fillColorColName)); *fillOpacityColIndex = fts_schema_get_index(colschema, fts_new_symbol(fillOpacityColName)); *typeColIndex = fts_schema_get_index(colschema, fts_new_symbol(typeColName)); + *activeColIndex = fts_schema_get_index(colschema, fts_new_symbol(activeColName)); *labelTextColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelTextColName)); *labelXOffsetColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelXOffsetColName)); *labelYOffsetColIndex = fts_schema_get_index(colschema, fts_new_symbol(labelYOffsetColName)); @@ -10504,6 +10663,7 @@ *fillColorColIndex = -1; *fillOpacityColIndex = -1; *typeColIndex = -1; + *activeColIndex = -1; *labelTextColIndex = -1; *labelXOffsetColIndex = -1; *labelYOffsetColIndex = -1; @@ -10516,8 +10676,8 @@ } static void -mat_gui_scatterplot_get_point(void *obj, void *context, int index, double *posx, double *posy, double *width, double *height, double *angle, double *markerType, - int xColIndex, int yColIndex, int widthColIndex, int heightColIndex, int angleColIndex, int typeColIndex) +mat_gui_scatterplot_get_point(void *obj, void *context, int index, double *posx, double *posy, double *width, double *height, double *angle, double *markerType, double *active, + int xColIndex, int yColIndex, int widthColIndex, int heightColIndex, int angleColIndex, int typeColIndex, int activeColIndex) { mat_t *self = (mat_t *)obj; fts_atom_t *val; @@ -10564,6 +10724,12 @@ if(fts_is_number(val)) *markerType = fts_get_number_float(val); } + if(activeColIndex >= 0 && activeColIndex < self->n) + { + val = mat_get_element(self, index, activeColIndex); + if(fts_is_number(val)) + *active = fts_get_number_float(val); + } mat_unlock(self); } Modified: trunk/ftm/ftmlib/classes/fvec.c =================================================================== --- trunk/ftm/ftmlib/classes/fvec.c 2023-03-20 17:39:52 UTC (rev 3797) +++ trunk/ftm/ftmlib/classes/fvec.c 2023-03-21 12:36:23 UTC (rev 3798) @@ -609,6 +609,40 @@ return ABS_MAX; } + +void +fvec_vector_get_means_in_range(float *ptr, int size, int stride, int start, int range, float *meanPos, float *meanNeg) +{ + float vmeanPos = 0.0f; + int numPos = 0; + float vmeanNeg = 0.0f; + int numNeg = 0; + if(size > 0 && start < size && start >= 0) + { + float val; + int i; + int num = (start+range >= size) ? size-start : range; + + for (i=stride*start; i<(start+num)*stride; i+=stride) + { + val = ptr[i]; + if(val >= 0) + { + vmeanPos += val*val; + numPos++; + } + else + { + vmeanNeg += val*val; + numNeg++; + } + } + vmeanPos = (numPos > 0) ? sqrt(vmeanPos/numPos) : 0; + vmeanNeg = (numNeg > 0) ? -sqrt(vmeanNeg/numNeg) : 0; + } + *meanPos = vmeanPos; + *meanNeg = vmeanNeg; +} /******************************************************************** * * (thread-safe) class functions Modified: trunk/ftm/ftmlib/classes/fvec.h =================================================================== --- trunk/ftm/ftmlib/classes/fvec.h 2023-03-20 17:39:52 UTC (rev 3797) +++ trunk/ftm/ftmlib/classes/fvec.h 2023-03-21 12:36:23 UTC (rev 3798) @@ -310,6 +310,7 @@ FTS_API float fvec_vector_get_min_in_range(float *ptr, int size, int stride, int start, int range); FTS_API float fvec_vector_get_max_in_range(float *ptr, int size, int stride, int start, int range); FTS_API float fvec_vector_get_mean_in_range(float *ptr, int size, int stride, int start, int range); +FTS_API void fvec_vector_get_means_in_range(float *ptr, int size, int stride, int start, int range, float *meanPos, float *meanNeg); /** * @brief This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-20 17:39:57
|
Revision: 3797 http://sourceforge.net/p/ftm/code/3797 Author: borghesi Date: 2023-03-20 17:39:52 +0000 (Mon, 20 Mar 2023) Log Message: ----------- Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-20 17:39:09 UTC (rev 3796) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2023-03-20 17:39:52 UTC (rev 3797) @@ -2956,6 +2956,7 @@ ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_sonogram)->isTimeTagged = fmat_gui_sonogram_is_timetagged; fmat_gui_interface_sonogram.getLength = fmat_gui_sonogram_get_length; fmat_gui_interface_sonogram.getSpectrumSize = fmat_gui_sonogram_get_spectrum_size; @@ -2963,7 +2964,6 @@ fmat_gui_interface_sonogram.getValues = fmat_gui_sonogram_get_values; fmat_gui_interface_sonogram.releaseValues = fmat_gui_sonogram_release_values; fmat_gui_interface_sonogram.isVector = fmat_gui_sonogram_is_vector; - fmat_gui_interface_sonogram.isTimeTagged = fmat_gui_sonogram_is_timetagged; fmat_gui_interface_sonogram.getMinMax = fmat_gui_sonogram_get_min_max; fmat_gui_interface_sonogram.getTwoMinMax = fmat_gui_sonogram_get_two_min_max; fmat_gui_interface_sonogram.getMeanStdDev = fmat_gui_sonogram_get_mean_stddev; @@ -3309,9 +3309,9 @@ ((imtr_guiInterface *)&fmat_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&fmat_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&fmat_gui_interface_traces)->setRingOffset = NULL; + ((imtr_guiInterface *)&fmat_gui_interface_traces)->isTimeTagged = fmat_gui_traces_is_time_tagged; fmat_gui_interface_traces.isVector = fmat_gui_traces_is_vector; - fmat_gui_interface_traces.isTimeTagged = fmat_gui_traces_is_time_tagged; fmat_gui_interface_traces.getLength = fmat_gui_traces_get_length; fmat_gui_interface_traces.getMaxNumParams = fmat_gui_traces_get_max_num_params; fmat_gui_interface_traces.getTracesNum = fmat_gui_traces_get_traces_num; @@ -6806,7 +6806,8 @@ ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->setRingOffset = NULL; - + ((imtr_guiInterface *)&sequence_gui_interface_sonogram)->isTimeTagged = sequence_gui_sonogram_is_timetagged; + sequence_gui_interface_sonogram.getLength = sequence_gui_sonogram_get_length; sequence_gui_interface_sonogram.getSpectrumSize = sequence_gui_sonogram_get_spectrum_size; sequence_gui_interface_sonogram.getDuration = sequence_gui_sonogram_get_duration; @@ -6816,7 +6817,6 @@ sequence_gui_interface_sonogram.getValues = NULL; sequence_gui_interface_sonogram.releaseValues = NULL; sequence_gui_interface_sonogram.isVector = sequence_gui_sonogram_is_vector; - sequence_gui_interface_sonogram.isTimeTagged = sequence_gui_sonogram_is_timetagged; sequence_gui_interface_sonogram.getFirst = sequence_gui_sonogram_get_first; sequence_gui_interface_sonogram.getByTime = sequence_gui_sonogram_get_by_time; sequence_gui_interface_sonogram.getNext = sequence_gui_sonogram_get_next; @@ -7222,9 +7222,9 @@ ((imtr_guiInterface *)&sequence_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&sequence_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&sequence_gui_interface_traces)->setRingOffset = NULL; - + ((imtr_guiInterface *)&sequence_gui_interface_traces)->isTimeTagged = sequence_gui_traces_is_time_tagged; + sequence_gui_interface_traces.isVector = sequence_gui_traces_is_vector; - sequence_gui_interface_traces.isTimeTagged = sequence_gui_traces_is_time_tagged; sequence_gui_interface_traces.getTracesNum = sequence_gui_traces_get_traces_num; sequence_gui_interface_traces.getMaxNumParams = sequence_gui_traces_get_max_num_params; sequence_gui_interface_traces.getColumnIndexes = sequence_gui_traces_get_column_indexes; @@ -7869,6 +7869,7 @@ ((imtr_guiInterface *)&track_gui_interface_sonogram)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_sonogram)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_sonogram)->setRingOffset = NULL; + ((imtr_guiInterface *)&track_gui_interface_sonogram)->isTimeTagged = track_gui_sonogram_is_timetagged; track_gui_interface_sonogram.getLength = track_gui_sonogram_get_length; track_gui_interface_sonogram.getSpectrumSize = track_gui_sonogram_get_spectrum_size; @@ -7879,7 +7880,6 @@ track_gui_interface_sonogram.getValues = NULL; track_gui_interface_sonogram.releaseValues = NULL; track_gui_interface_sonogram.isVector = track_gui_sonogram_is_vector; - track_gui_interface_sonogram.isTimeTagged = track_gui_sonogram_is_timetagged; track_gui_interface_sonogram.getFirst = track_gui_sonogram_get_first; track_gui_interface_sonogram.getByTime = track_gui_sonogram_get_by_time; track_gui_interface_sonogram.getNext = track_gui_sonogram_get_next; @@ -8268,9 +8268,9 @@ ((imtr_guiInterface *)&track_gui_interface_traces)->getBufferIndex = fts_get_buffer_index_default; ((imtr_guiInterface *)&track_gui_interface_traces)->getRing = NULL; ((imtr_guiInterface *)&track_gui_interface_traces)->setRingOffset = NULL; - + ((imtr_guiInterface *)&track_gui_interface_traces)->isTimeTagged = track_gui_traces_is_time_tagged; + track_gui_interface_traces.isVector = track_gui_traces_is_vector; - track_gui_interface_traces.isTimeTagged = track_gui_traces_is_time_tagged; track_gui_interface_traces.getLength = track_gui_traces_get_length; track_gui_interface_traces.getMaxNumParams = track_gui_traces_get_max_num_params; track_gui_interface_traces.getTracesNum = track_gui_traces_get_traces_num; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2023-03-20 17:39:13
|
Revision: 3796 http://sourceforge.net/p/ftm/code/3796 Author: borghesi Date: 2023-03-20 17:39:09 +0000 (Mon, 20 Mar 2023) Log Message: ----------- Modified Paths: -------------- trunk/ftm/ftmlib/max5/ftmversion.h Modified: trunk/ftm/ftmlib/max5/ftmversion.h =================================================================== --- trunk/ftm/ftmlib/max5/ftmversion.h 2023-03-19 16:11:08 UTC (rev 3795) +++ trunk/ftm/ftmlib/max5/ftmversion.h 2023-03-20 17:39:09 UTC (rev 3796) @@ -1,14 +1,14 @@ /* generated automatically from xcode project ftmlib (target = ftmlib) by ./writeversion.sh */ #define FTM_VERSION_MAJOR 2 -#define FTM_VERSION_MINOR 7 -#define FTM_VERSION_RELEASE 6 -#define FTM_VERSION_BETA "BETA" +#define FTM_VERSION_MINOR 8 +#define FTM_VERSION_RELEASE 1 +#define FTM_VERSION_BETA "" -#define FTM_VERSION 2.7.6 -#define FTM_VERSION_STRING "2.7.6.BETA" -#define FTM_VERSION_TAG "BETA" +#define FTM_VERSION 2.8.1 +#define FTM_VERSION_STRING "2.8.1" +#define FTM_VERSION_TAG "" -#define FTM_VERSION_DATE "10/2022" -#define FTM_VERSION_FULL 2.7.6 BETA -#define FTM_VERSION_FULL_STRING "2.7.6 BETA" -#define FTM_VERSION_FULL_DATE "2.7.6 BETA 10/2022" +#define FTM_VERSION_DATE "03/2023" +#define FTM_VERSION_FULL 2.8.1 +#define FTM_VERSION_FULL_STRING "2.8.1" +#define FTM_VERSION_FULL_DATE "2.8.1 03/2023" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2023-03-19 16:11:10
|
Revision: 3795 http://sourceforge.net/p/ftm/code/3795 Author: diemo Date: 2023-03-19 16:11:08 +0000 (Sun, 19 Mar 2023) Log Message: ----------- v2.8.1 with very last fix? Modified Paths: -------------- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj Modified: trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2023-03-19 16:09:26 UTC (rev 3794) +++ trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2023-03-19 16:11:08 UTC (rev 3795) @@ -2746,11 +2746,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"10/2022\\\""; + VERSION_DATE = "\\\"01/2023\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 0; + VERSION_RELEASE = 1; VERSION_TAG = "\\\"\\\""; }; name = Debug_optimised; @@ -2966,11 +2966,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"10/2022\\\""; + VERSION_DATE = "\\\"01/2023\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 0; + VERSION_RELEASE = 1; VERSION_TAG = "\\\"\\\""; }; name = Debug; @@ -3042,11 +3042,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"10/2022\\\""; + VERSION_DATE = "\\\"01/2023\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 0; + VERSION_RELEASE = 1; VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; @@ -3200,11 +3200,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"10/2022\\\""; + VERSION_DATE = "\\\"01/2023\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 0; + VERSION_RELEASE = 1; VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; @@ -3550,11 +3550,11 @@ SNDFILE_LIBS = "$(SNDFILE_DIR)/macos/libFLAC.a $(SNDFILE_DIR)/macos/libogg.a $(SNDFILE_DIR)/macos-x64-arm64/libsndfile.a $(SNDFILE_DIR)/macos/libvorbis.a $(SNDFILE_DIR)/macos/libvorbisenc.a"; SYS_FRAMEWORKS = "-framework Accelerate -framework Carbon"; VECLIB_FRAMEWORK_DIR = /System/Library/Frameworks/Accelerate.framework/Frameworks; - VERSION_DATE = "\\\"10/2022\\\""; + VERSION_DATE = "\\\"01/2023\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; VERSION_MINOR = 8; - VERSION_RELEASE = 0; + VERSION_RELEASE = 1; VERSION_TAG = "\\\"\\\""; }; name = Debug_harder; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2023-03-19 16:09:27
|
Revision: 3794 http://sourceforge.net/p/ftm/code/3794 Author: diemo Date: 2023-03-19 16:09:26 +0000 (Sun, 19 Mar 2023) Log Message: ----------- undo nefarious r3780 with use of NOGOOD check on fts_object_t(!) in fts_object_destroy (no object AT ALL was ever freed...), add more info in heavy debug build (count listeners) Modified Paths: -------------- trunk/ftm/ftmlib/object.c Modified: trunk/ftm/ftmlib/object.c =================================================================== --- trunk/ftm/ftmlib/object.c 2023-01-11 21:24:37 UTC (rev 3793) +++ trunk/ftm/ftmlib/object.c 2023-03-19 16:09:26 UTC (rev 3794) @@ -110,11 +110,8 @@ void fts_object_destroy(fts_object_t *obj) { - if(!NOGOOD((t_object *)obj)) - { - fts_object_reset(obj); - fts_object_free(obj); - } + fts_object_reset(obj); + fts_object_free(obj); } #if (defined(DEBUG_REF_COUNT) && DEBUG_REF_COUNT == 1) @@ -148,8 +145,13 @@ return o->refcnt; } else + { + if (fts_object_get_class(o) != NULL && fts_object_get_class_name(o) != NULL) + post("fts_object_release %p type %s refcount = %d", o, fts_symbol_name(fts_object_get_class_name(o)), o->refcnt - 1); + // as macro: ((--(((fts_object_t *)(o))->refcnt) > 0)? 0: (fts_object_destroy((fts_object_t *)(o)), 0)); return fts_atomic_decrement(&(o->refcnt)) > 0 ? 0 : (fts_object_destroy(o), 0); + } } #endif @@ -379,6 +381,19 @@ (*l->callback)(o, l->listener, s, ac, at); } +/* for debugging: count number of listeners in list */ +int +fts_object_count_listeners(fts_object_t *o) +{ + int count = 0; + fts_object_listener_t *l; + + for(l=o->listeners; l!=NULL; l=l->next) + count++; + + return count; +} + /***************************************************************************** * * thread read/write locks @@ -508,16 +523,16 @@ { if(fts_send_message(o, selector, ac, at, ret) == NULL) { - fts_class_t *cl = fts_object_get_class(o); - fts_symbol_t cl_name = fts_class_get_name(cl); - - if(cl_name != NULL) - { - if(fts_class_has_method(cl, selector)) - return fts_status_format("%s doesn't have method '%s' with given arguments", fts_symbol_name(cl_name), fts_symbol_name(selector)); - else - return fts_status_format("%s doesn't have method '%s'", fts_symbol_name(cl_name), fts_symbol_name(selector)); - } + fts_class_t *cl = fts_object_get_class(o); + fts_symbol_t cl_name = fts_class_get_name(cl); + + if(cl_name != NULL) + { + if(fts_class_has_method(cl, selector)) + return fts_status_format("%s doesn't have method '%s' with given arguments", fts_symbol_name(cl_name), fts_symbol_name(selector)); + else + return fts_status_format("%s doesn't have method '%s'", fts_symbol_name(cl_name), fts_symbol_name(selector)); + } } return fts_ok; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2023-01-11 21:24:39
|
Revision: 3793 http://sourceforge.net/p/ftm/code/3793 Author: diemo Date: 2023-01-11 21:24:37 +0000 (Wed, 11 Jan 2023) Log Message: ----------- fix linker flags for Max7 compatibility Modified Paths: -------------- trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj Modified: trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj 2022-11-29 12:23:35 UTC (rev 3792) +++ trunk/ftm/build/max5/osx-macho/ftmexternals.xcodeproj/project.pbxproj 2023-01-11 21:24:37 UTC (rev 3793) @@ -2977,6 +2977,7 @@ 21195BA318800BF200EAB1FF /* Debug_harder */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; @@ -3027,7 +3028,7 @@ JUCE_DIR = "$(COMPONENTS_DIR)/juce"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "-framework", Carbon, @@ -3696,6 +3697,7 @@ 218B72540E80091000A7CEAD /* Debug_optimised */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; @@ -3745,7 +3747,7 @@ JUCE_DIR = "$(COMPONENTS_DIR)/juce"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "-framework", Carbon, @@ -4187,6 +4189,7 @@ 3B5DEE230861C3ED00B9AEEA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; @@ -4234,7 +4237,7 @@ JUCE_DIR = "$(COMPONENTS_DIR)/juce"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "-framework", Carbon, @@ -4258,6 +4261,7 @@ 3B5DEE240861C3ED00B9AEEA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_WARN_ENUM_CONVERSION = YES; @@ -4311,7 +4315,7 @@ JUCE_DIR = "$(COMPONENTS_DIR)/juce"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "-framework", Carbon, @@ -4358,6 +4362,7 @@ 3BFD349324C1F61800A7EF6B /* ReleaseCodesign */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CLANG_CXX_LIBRARY = "libc++"; CLANG_LINK_OBJC_RUNTIME = NO; CLANG_WARN_ENUM_CONVERSION = YES; @@ -4413,7 +4418,7 @@ JUCE_DIR = "$(COMPONENTS_DIR)/juce"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_CODE_SIGN_FLAGS = "--timestamp"; OTHER_LDFLAGS = ( "-framework", Modified: trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2022-11-29 12:23:35 UTC (rev 3792) +++ trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2023-01-11 21:24:37 UTC (rev 3793) @@ -711,8 +711,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -724,8 +722,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( parser.c, @@ -738,8 +734,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -751,8 +745,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( parser.h, @@ -765,8 +757,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.y"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( parser.c, @@ -779,8 +769,6 @@ compilerSpec = com.apple.compilers.proxy.script; filePatterns = "*.l"; fileType = pattern.proxy; - inputFiles = ( - ); isEditable = 1; outputFiles = ( tokenizer.c, @@ -2695,6 +2683,7 @@ 21ECC365164954EE00F9B177 /* Debug_optimised */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; COMPONENTS_DIR = ../../../../components; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; @@ -2743,7 +2732,7 @@ LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "$(SYS_FRAMEWORKS)", "$(MAX_FRAMEWORKS)", @@ -2914,6 +2903,7 @@ 3B5DEDA00861BFE900B9AEEA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; COMPONENTS_DIR = ../../../../components; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; @@ -2962,7 +2952,7 @@ LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "$(SYS_FRAMEWORKS)", "$(MAX_FRAMEWORKS)", @@ -2988,6 +2978,7 @@ 3B5DEDA10861BFE900B9AEEA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; COMPONENTS_DIR = ../../../../components; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = dwarf; @@ -3037,7 +3028,7 @@ LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "$(SYS_FRAMEWORKS)", "$(MAX_FRAMEWORKS)", @@ -3142,6 +3133,7 @@ 3BFD348924C1F0F500A7EF6B /* ReleaseCodesign */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; CODE_SIGN_IDENTITY = "Developer ID Application: INST RECHER COORD ACOUST MUSICALE (3BD2P55TR2)"; CODE_SIGN_STYLE = Manual; COMPONENTS_DIR = ../../../../components; @@ -3193,7 +3185,7 @@ LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_CODE_SIGN_FLAGS = "--timestamp"; OTHER_LDFLAGS = ( "$(SYS_FRAMEWORKS)", @@ -3495,6 +3487,7 @@ 8937598810760F4A00644327 /* Debug_harder */ = { isa = XCBuildConfiguration; buildSettings = { + C74_SYM_LINKER_FLAGS = "$(MAXAPI_DIR)/max-includes/c74_linker_flags.txt"; COMPONENTS_DIR = ../../../../components; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; @@ -3543,7 +3536,7 @@ LIBRARY_SEARCH_PATHS = "$(COMPONENTS_DIR)/**"; MACOSX_DEPLOYMENT_TARGET = 10.11; MAXAPI_DIR = "${COMPONENTS_DIR}/maxapi/max8.2"; - MAX_FRAMEWORKS = "-framework MaxAPI -framework MaxAudioAPI"; + MAX_FRAMEWORKS = "@$(C74_SYM_LINKER_FLAGS) -framework MaxAudioAPI -Wl,-U,_object_new_imp,-U,_object_method_imp"; OTHER_LDFLAGS = ( "$(SYS_FRAMEWORKS)", "$(MAX_FRAMEWORKS)", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2022-11-29 12:23:37
|
Revision: 3792 http://sourceforge.net/p/ftm/code/3792 Author: diemo Date: 2022-11-29 12:23:35 +0000 (Tue, 29 Nov 2022) Log Message: ----------- untabify Modified Paths: -------------- trunk/ftm/ftmlib/expression.c Modified: trunk/ftm/ftmlib/expression.c =================================================================== --- trunk/ftm/ftmlib/expression.c 2022-11-29 12:20:42 UTC (rev 3791) +++ trunk/ftm/ftmlib/expression.c 2022-11-29 12:23:35 UTC (rev 3792) @@ -254,7 +254,7 @@ else if(sym == sym_strict) error_checking_level = error_checking_strict; else - return -1; + return -1; return error_checking_level; } @@ -280,13 +280,13 @@ { if(return_args == return_varargs) { - if(error_checking_level != error_checking_strict || status == missing_argument_error) - return fts_ok; + if(error_checking_level != error_checking_strict || status == missing_argument_error) + return fts_ok; } else if(error_checking_level <= error_checking_loose) { - expression_stack_push(exp, fts_zero); - return fts_ok; + expression_stack_push(exp, fts_zero); + return fts_ok; } return status; @@ -306,22 +306,22 @@ if(return_args == return_value) { - if(error_checking_level > error_checking_loose) - { - expression_stack_pop_frame( exp); - return status; - } - - return exp_return_value(exp, at); + if(error_checking_level > error_checking_loose) + { + expression_stack_pop_frame( exp); + return status; + } + + return exp_return_value(exp, at); } for(i=0; i<ac; i++) - fts_atom_refer(at + i); + fts_atom_refer(at + i); expression_stack_pop_frame( exp); for(i=0; i<ac; i++) - expression_stack_push(exp, at + i); + expression_stack_push(exp, at + i); return fts_ok; } @@ -330,7 +330,7 @@ exp_return_varargs_or_error(fts_expression_t *exp, fts_atom_t *a, enum return_args_e return_args) { if(fts_is_void(a)) - return exp_return_void_or_error(exp, missing_argument_error, return_args); + return exp_return_void_or_error(exp, missing_argument_error, return_args); else if(fts_is_pointer(a)) { fts_array_t *array = (fts_array_t *)fts_get_pointer(a); @@ -340,11 +340,11 @@ switch(ac) { case 0: - return exp_return_void_or_error(exp, missing_argument_error, return_args); + return exp_return_void_or_error(exp, missing_argument_error, return_args); case 1: - return exp_return_value(exp, at); + return exp_return_value(exp, at); default: - return exp_return_multiple_or_error(exp, ac, at, multiple_arguments_error, return_args); + return exp_return_multiple_or_error(exp, ac, at, multiple_arguments_error, return_args); } } @@ -378,10 +378,10 @@ { if(status == fts_ok) { - if(status == missing_argument_error || status == multiple_arguments_error) - return exp_error_return(exp, error_status, return_args); - - return fts_ok; + if(status == missing_argument_error || status == multiple_arguments_error) + return exp_error_return(exp, error_status, return_args); + + return fts_ok; } return exp_error_return(exp, status, return_args); @@ -394,10 +394,10 @@ if(status == fts_ok) { - if(status == missing_argument_error) - return exp_error_return(exp, error_status, return_args); - - return fts_ok; + if(status == missing_argument_error) + return exp_error_return(exp, error_status, return_args); + + return fts_ok; } return exp_error_return(exp, status, return_args); @@ -414,12 +414,12 @@ { if(status != fts_ok) { - if(status == missing_argument_error) - return exp_error_return_nopop(exp, fts_status_format("missing %s operand for %s", operand, operation), return_args); - else if (status == multiple_arguments_error) - return exp_error_return_nopop(exp, fts_status_format("multiple %s operands for %s", operand, operation), return_args); - - return exp_error_return_nopop(exp, status, return_args); + if(status == missing_argument_error) + return exp_error_return_nopop(exp, fts_status_format("missing %s operand for %s", operand, operation), return_args); + else if (status == multiple_arguments_error) + return exp_error_return_nopop(exp, fts_status_format("multiple %s operands for %s", operand, operation), return_args); + + return exp_error_return_nopop(exp, status, return_args); } return fts_ok; @@ -431,12 +431,12 @@ /* no pop for binary operations */ if(status != fts_ok) { - if(status == missing_argument_error) - return exp_error_return(exp, fts_status_format("missing %s operand for %s", operand, operation), return_args); - else if (status == multiple_arguments_error) - return exp_error_return(exp, fts_status_format("multiple %s operands for %s", operand, operation), return_args); - - return exp_error_return(exp, status, return_args); + if(status == missing_argument_error) + return exp_error_return(exp, fts_status_format("missing %s operand for %s", operand, operation), return_args); + else if (status == multiple_arguments_error) + return exp_error_return(exp, fts_status_format("multiple %s operands for %s", operand, operation), return_args); + + return exp_error_return(exp, status, return_args); } return fts_ok; @@ -934,7 +934,7 @@ expression_stack_pop( exp, 1); #if COMPARE_OBJECTS - else if (fts_is_object(top-1) && fts_is_object(top)) /* object comparision */ \ + else if (fts_is_object(top-1) && fts_is_object(top)) /* object comparision */ \ fts_set_int(top-1, fts_atom_compare(top-1, top) OP 0); #endif @@ -1072,7 +1072,7 @@ case TK_DOLLAR: { - fts_atom_t *ptr = NULL; // atom referred to by $<something> + fts_atom_t *ptr = NULL; // atom referred to by $<something> expression_stack_push_frame(exp); exp_return_clear(exp, &ret); @@ -1123,12 +1123,12 @@ { if(ptr != NULL) { - fts_atom_assign(ptr, &assignment_data->val); + fts_atom_assign(ptr, &assignment_data->val); ret = *ptr; } else return exp_error_return(exp, invalid_assignment_left_value_error, return_args); - + break; } case TK_COLON_EQUAL: @@ -1137,7 +1137,7 @@ ret = *ptr; if(tree_binop_atom_invoke(tree, &ret, fts_s_set, &assignment_data->val) == NULL) - return exp_error_return_invalid_operands(exp, "copy assignement (:=)", return_args); + return exp_error_return_invalid_operands(exp, "copy assignement (:=)", return_args); break; } @@ -1148,7 +1148,7 @@ ptr = &ret; if(tree_op_atom_incr(assignment_data->tree, ptr, assignment_data->tok, &assignment_data->val) == NULL) - return exp_error_return_invalid_operands(exp, "arithmetic/assignment (+=, -=, *=, /=)", return_args); + return exp_error_return_invalid_operands(exp, "arithmetic/assignment (+=, -=, *=, /=)", return_args); ret = *ptr; @@ -1159,97 +1159,97 @@ } else if(ptr != NULL) ret = *ptr; - + return exp_return_varargs_or_error(exp, &ret, return_args); } case TK_ELEMENT: { - enum return_args_e required_return_args = (error_checking_level == error_checking_strict)? return_value: return_varargs; - + enum return_args_e required_return_args = (error_checking_level == error_checking_strict)? return_value: return_varargs; + expression_stack_push_frame( exp); /* get object */ if((status = expression_eval_aux( tree->left, exp, callback, data, NULL, required_return_args)) != fts_ok) - return exp_error_check_value(exp, status, element_invalid_object_error, required_return_args); + return exp_error_check_value(exp, status, element_invalid_object_error, required_return_args); ac = expression_stack_frame_count( exp); at = expression_stack_frame( exp); if(ac == 1) - { - if(fts_is_object(at)) - { - /* get object before braces */ - fts_object_t *obj = fts_get_object(at); - enum return_args_e required_return_args = (error_checking_level == error_checking_strict)? return_non_void: return_varargs; - - /* get index/indices */ - if ((status = expression_eval_aux( tree->right, exp, callback, data, NULL, required_return_args)) != fts_ok) - return exp_error_check_nonvoid(exp, status, element_invalid_index_error, required_return_args); - - ac = expression_stack_frame_count( exp); - - /* skip object (keep reference on stack) */ - ac--; - at++; - - if(ac > 0) - { - fts_set_void(&ret); - - if(assignment_data == NULL) - { - fts_object_get_element(obj, ac, at, &ret); - - if(fts_is_void(&ret)) - return exp_return_void_or_error(exp, element_invalid_return_error, return_args); - } - else - { - /* elemement assignment: $x[...] = ... */ - switch(assignment_data->tok) - { - case TK_EQUAL: - fts_object_set_element(obj, ac, at, &assignment_data->val); - ret = assignment_data->val; - break; - - case TK_COLON_EQUAL: - { - fts_object_get_element(obj, ac, at, &ret); - - if(tree_binop_atom_invoke(tree, &ret, fts_s_set, &assignment_data->val) == NULL) - return exp_error_return_invalid_operands(exp, "copy assignement (:=)", return_args); - - break; - } - - default: - { - fts_object_get_element(obj, ac, at, &ret); - - if(fts_is_void(&ret)) - return exp_return_void_or_error(exp, element_invalid_return_error, return_args); - - if(tree_op_atom_incr(assignment_data->tree, &ret, assignment_data->tok, &assignment_data->val) == NULL) - return exp_error_return_invalid_operands(exp, "arithmetic/assignment (+=, -=, *=, /=)", return_args); - - fts_object_set_element(obj, ac, at, &ret); - - break; - } - } - } - - return exp_return_value(exp, &ret); - } - } - else - return exp_error_return(exp, fts_status_format("cannot get element from %s", fts_symbol_name(fts_get_class_name(at))), return_args); - } - - return exp_return_void_or_error(exp, element_invalid_object_error, return_args); + { + if(fts_is_object(at)) + { + /* get object before braces */ + fts_object_t *obj = fts_get_object(at); + enum return_args_e required_return_args = (error_checking_level == error_checking_strict)? return_non_void: return_varargs; + + /* get index/indices */ + if ((status = expression_eval_aux( tree->right, exp, callback, data, NULL, required_return_args)) != fts_ok) + return exp_error_check_nonvoid(exp, status, element_invalid_index_error, required_return_args); + + ac = expression_stack_frame_count( exp); + + /* skip object (keep reference on stack) */ + ac--; + at++; + + if(ac > 0) + { + fts_set_void(&ret); + + if(assignment_data == NULL) + { + fts_object_get_element(obj, ac, at, &ret); + + if(fts_is_void(&ret)) + return exp_return_void_or_error(exp, element_invalid_return_error, return_args); + } + else + { + /* elemement assignment: $x[...] = ... */ + switch(assignment_data->tok) + { + case TK_EQUAL: + fts_object_set_element(obj, ac, at, &assignment_data->val); + ret = assignment_data->val; + break; + + case TK_COLON_EQUAL: + { + fts_object_get_element(obj, ac, at, &ret); + + if(tree_binop_atom_invoke(tree, &ret, fts_s_set, &assignment_data->val) == NULL) + return exp_error_return_invalid_operands(exp, "copy assignement (:=)", return_args); + + break; + } + + default: + { + fts_object_get_element(obj, ac, at, &ret); + + if(fts_is_void(&ret)) + return exp_return_void_or_error(exp, element_invalid_return_error, return_args); + + if(tree_op_atom_incr(assignment_data->tree, &ret, assignment_data->tok, &assignment_data->val) == NULL) + return exp_error_return_invalid_operands(exp, "arithmetic/assignment (+=, -=, *=, /=)", return_args); + + fts_object_set_element(obj, ac, at, &ret); + + break; + } + } + } + + return exp_return_value(exp, &ret); + } + } + else + return exp_error_return(exp, fts_status_format("cannot get element from %s", fts_symbol_name(fts_get_class_name(at))), return_args); + } + + return exp_return_void_or_error(exp, element_invalid_object_error, return_args); } case TK_PREFIX: @@ -1257,8 +1257,8 @@ expression_stack_push_frame( exp); if((status = expression_eval_aux( tree->left, exp, callback, data, NULL, return_varargs)) != fts_ok) - return exp_error_return(exp, status, return_args); - + return exp_error_return(exp, status, return_args); + ac = expression_stack_frame_count( exp); at = expression_stack_frame( exp); @@ -1271,8 +1271,8 @@ fts_symbol_t fun_name = fts_get_symbol(at); if((status = fts_function_call((fts_object_t *)exp->scope, fun_name, ac - 1, at + 1, &ret)) != fts_ok) - return exp_error_return(exp, status, return_args); - + return exp_error_return(exp, status, return_args); + return exp_return_varargs_or_error(exp, &ret, return_args); } else if (ac > 1 && fts_is_object( at) && fts_is_symbol( at + 1)) @@ -1282,16 +1282,16 @@ fts_symbol_t selector = fts_get_symbol(at + 1); fts_object_refer(obj); - - if((status = fts_method_call(obj, selector, ac - 2, at + 2, &ret)) != fts_ok) - { - fts_object_release(obj); - return exp_error_return(exp, status, return_args); - } + + if((status = fts_method_call(obj, selector, ac - 2, at + 2, &ret)) != fts_ok) + { + fts_object_release(obj); + return exp_error_return(exp, status, return_args); + } status = exp_return_varargs_or_error(exp, &ret, return_args); fts_object_release(obj); - return status; + return status; } else if(ac == 1) { @@ -1299,10 +1299,10 @@ ret = at[0]; return exp_return_value(exp, &ret); } - else if(ac != 0) - return exp_error_return(exp, invalid_parenthesis_expression_error, return_args); + else if(ac != 0) + return exp_error_return(exp, invalid_parenthesis_expression_error, return_args); - return exp_return_void_or_error(exp, fts_ok, return_args); + return exp_return_void_or_error(exp, fts_ok, return_args); } case TK_UPLUS: @@ -1486,7 +1486,7 @@ LBINOP_EVAL(<=); break; - case TK_EQUAL: + case TK_EQUAL: { assignment_data_t assignment_data; @@ -1497,7 +1497,7 @@ return exp_error_check_assignment_operand(exp, status, "right", "assignement (=)", return_args); at = expression_stack_frame( exp); - + assignment_data.tree = tree; assignment_data.tok = tree->token; assignment_data.val = at[0]; @@ -1508,7 +1508,7 @@ ret = at[1]; return exp_return_value(exp, &ret); } - + case TK_COLON_EQUAL: { assignment_data_t assignment_data; @@ -1556,7 +1556,7 @@ ret = at[1]; return exp_return_value(exp, &ret); } - + case TK_SECT: return invalid_operator_sect_error; @@ -1918,7 +1918,7 @@ fts_expression_set_globals(self->expression, globals); fts_expression_set_locals(self->expression, locals); fts_expression_set_env(self->expression, ac, at); - + status = fts_expression_evaluate(self->expression, expr_function_callback, (void *)ret); if(status != fts_ok) @@ -1961,10 +1961,10 @@ { fts_hashtable_t *globals = fts_scope_get_values(fts_global_scope); - fts_expression_set_globals(self->expression, globals); - fts_expression_set_locals(self->expression, locals); - fts_expression_set_env(self->expression, ac, at); - + fts_expression_set_globals(self->expression, globals); + fts_expression_set_locals(self->expression, locals); + fts_expression_set_env(self->expression, ac, at); + fts_array_clear(&self->descr); self->status = fts_expression_evaluate(self->expression, expr_method_callback, self); @@ -2091,11 +2091,11 @@ if(ac > 0) { - self->value = at[0]; - fts_atom_refer(at); + self->value = at[0]; + fts_atom_refer(at); } else - fts_set_int(&self->value, 0); + fts_set_int(&self->value, 0); return fts_ok; } @@ -2136,4 +2136,3 @@ expr_class = fts_class_install(fts_s_expr, expr_instantiate); fts_variable_class = fts_class_install(NULL, variable_instantiate); } - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2022-11-29 12:20:44
|
Revision: 3791 http://sourceforge.net/p/ftm/code/3791 Author: diemo Date: 2022-11-29 12:20:42 +0000 (Tue, 29 Nov 2022) Log Message: ----------- debug listener list getting longer, due to botched release check Modified Paths: -------------- trunk/ftm/ftmlib/classes/fvec.c trunk/ftm/ftmlib/object.h Modified: trunk/ftm/ftmlib/classes/fvec.c =================================================================== --- trunk/ftm/ftmlib/classes/fvec.c 2022-11-29 12:17:02 UTC (rev 3790) +++ trunk/ftm/ftmlib/classes/fvec.c 2022-11-29 12:20:42 UTC (rev 3791) @@ -407,10 +407,12 @@ fts_object_refer((fts_object_t *)fmat); self->fmat = fmat; fts_object_add_listener((fts_object_t *)fmat, self, fvec_listener_callback); - + //printf("fvec_set_fmat self %p add_listener fmat %p (%) (count %d)\n", self, fmat, fts_object_count_listeners((fts_object_t *) fmat)); + if(old != NULL) { fts_object_remove_listener((fts_object_t *)old, self); + //printf("fvec_set_fmat self %p remove_listener old %p (count %d)\n", self, old, fts_object_count_listeners((fts_object_t *) old)); fts_object_release((fts_object_t *)old); } } @@ -2924,6 +2926,7 @@ fvec_t *self = (fvec_t *)o; fts_object_remove_listener((fts_object_t *)self->fmat, self); + //printf("fvec_delete self %p remove_listener fmat %p (count %d)\n", self, self->fmat, fts_object_count_listeners((fts_object_t *) self->fmat)); fts_object_release((fts_object_t *)self->fmat); return fts_ok; Modified: trunk/ftm/ftmlib/object.h =================================================================== --- trunk/ftm/ftmlib/object.h 2022-11-29 12:17:02 UTC (rev 3790) +++ trunk/ftm/ftmlib/object.h 2022-11-29 12:20:42 UTC (rev 3791) @@ -325,6 +325,9 @@ */ FTS_API void fts_object_call_listeners(fts_object_t *o, fts_symbol_t s, int ac, const fts_atom_t *at); +/* for debugging: count number of listeners in list */ +FTS_API int fts_object_count_listeners(fts_object_t *o); + #ifdef DOXYGEN_DOC /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2022-11-29 12:17:05
|
Revision: 3790 http://sourceforge.net/p/ftm/code/3790 Author: diemo Date: 2022-11-29 12:17:02 +0000 (Tue, 29 Nov 2022) Log Message: ----------- remove warning Modified Paths: -------------- trunk/ftm/ftmlib/classes/ftmdatagui.c Modified: trunk/ftm/ftmlib/classes/ftmdatagui.c =================================================================== --- trunk/ftm/ftmlib/classes/ftmdatagui.c 2022-10-07 12:07:36 UTC (rev 3789) +++ trunk/ftm/ftmlib/classes/ftmdatagui.c 2022-11-29 12:17:02 UTC (rev 3790) @@ -3661,7 +3661,7 @@ *value = fmat_get_element(self, next, onset+1); fmat_unlock(self); - return (void *) (next + 1); /* return next index as point */ + return (void *) (intptr_t) (next + 1); /* return next index as point */ } else return NULL; /* return point */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2022-10-07 12:07:44
|
Revision: 3789 http://sourceforge.net/p/ftm/code/3789 Author: borghesi Date: 2022-10-07 12:07:36 +0000 (Fri, 07 Oct 2022) Log Message: ----------- Modified Paths: -------------- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj trunk/ftm/distrib/ReleaseNotes.txt Modified: trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj =================================================================== --- trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2022-10-07 09:10:28 UTC (rev 3788) +++ trunk/ftm/build/max5/osx-macho/ftmlib.xcodeproj/project.pbxproj 2022-10-07 12:07:36 UTC (rev 3789) @@ -1942,7 +1942,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "outheader=../../../ftmlib/ftmversion.h\noutscript=../../../ftmlib/ftmversion.sh\n\n./writeversion.sh $outheader $outscript\nexit 0"; + shellScript = "outheader=../../../ftmlib/ftmversion.h\noutscript=../../../ftmlib/ftmversion.sh\n\n./writeversion.sh $outheader $outscript\nexit 0\n"; }; 5C7009700B836A3F001663C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2760,9 +2760,9 @@ VERSION_DATE = "\\\"10/2022\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; - VERSION_MINOR = 7; - VERSION_RELEASE = 6; - VERSION_TAG = "\\\"BETA\\\""; + VERSION_MINOR = 8; + VERSION_RELEASE = 0; + VERSION_TAG = "\\\"\\\""; }; name = Debug_optimised; }; @@ -2979,9 +2979,9 @@ VERSION_DATE = "\\\"10/2022\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; - VERSION_MINOR = 7; - VERSION_RELEASE = 6; - VERSION_TAG = "\\\"BETA\\\""; + VERSION_MINOR = 8; + VERSION_RELEASE = 0; + VERSION_TAG = "\\\"\\\""; }; name = Debug; }; @@ -3054,9 +3054,9 @@ VERSION_DATE = "\\\"10/2022\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; - VERSION_MINOR = 7; - VERSION_RELEASE = 6; - VERSION_TAG = "\\\"BETA\\\""; + VERSION_MINOR = 8; + VERSION_RELEASE = 0; + VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; name = Release; @@ -3211,9 +3211,9 @@ VERSION_DATE = "\\\"10/2022\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; - VERSION_MINOR = 7; - VERSION_RELEASE = 6; - VERSION_TAG = "\\\"BETA\\\""; + VERSION_MINOR = 8; + VERSION_RELEASE = 0; + VERSION_TAG = "\\\"\\\""; WARNING_LDFLAGS = ""; }; name = ReleaseCodesign; @@ -3560,9 +3560,9 @@ VERSION_DATE = "\\\"10/2022\\\""; VERSION_MACROS = "FTM_VERSION_MAJOR=$(VERSION_MAJOR) FTM_VERSION_MINOR=$(VERSION_MINOR) FTM_VERSION_RELEASE=$(VERSION_RELEASE) FTM_VERSION_TAG=$(VERSION_TAG) FTM_VERSION_DATE=$(VERSION_DATE)"; VERSION_MAJOR = 2; - VERSION_MINOR = 7; - VERSION_RELEASE = 6; - VERSION_TAG = "\\\"BETA\\\""; + VERSION_MINOR = 8; + VERSION_RELEASE = 0; + VERSION_TAG = "\\\"\\\""; }; name = Debug_harder; }; Modified: trunk/ftm/distrib/ReleaseNotes.txt =================================================================== --- trunk/ftm/distrib/ReleaseNotes.txt 2022-10-07 09:10:28 UTC (rev 3788) +++ trunk/ftm/distrib/ReleaseNotes.txt 2022-10-07 12:07:36 UTC (rev 3789) @@ -11,6 +11,7 @@ - fixed occasional crash on load with resolve_unresolved_scopes (depending on loadbang order for scripted bpatchers) - added asinh, acosh, atanh functions +- ftm.editor: fixed display bug for fvec in wave editor ____________________________________________________ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2022-10-07 09:10:29
|
Revision: 3788 http://sourceforge.net/p/ftm/code/3788 Author: diemo Date: 2022-10-07 09:10:28 +0000 (Fri, 07 Oct 2022) Log Message: ----------- update releases notes 2.8.0 Modified Paths: -------------- trunk/ftm/distrib/ReleaseNotes.txt Modified: trunk/ftm/distrib/ReleaseNotes.txt =================================================================== --- trunk/ftm/distrib/ReleaseNotes.txt 2022-10-06 16:43:12 UTC (rev 3787) +++ trunk/ftm/distrib/ReleaseNotes.txt 2022-10-07 09:10:28 UTC (rev 3788) @@ -3,10 +3,23 @@ * FTM * real-time object system for Max/MSP * -* \xA9 Copyright 2004-2009 IRCAM - Centre Pompidou +* \xA9 Copyright 2004-2022 IRCAM - Centre Pompidou * ____________________________________________________ +RELEASE NOTES FTM.2.8.0 (10/10/2022) + +- fixed occasional crash on load with resolve_unresolved_scopes (depending on loadbang order for scripted bpatchers) +- added asinh, acosh, atanh functions + + +____________________________________________________ +RELEASE NOTES FTM.2.7.6.BETA (06/10/2022) + +This release supports OSX ARM64 platform, abandons the 32 bit version and contains some minor bug fixes. + + +____________________________________________________ RELEASE NOTES FTM.2.7.5.BETA (09/04/2021) - codesigned and notarized MacOS release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <di...@us...> - 2022-10-06 16:24:17
|
Revision: 3786 http://sourceforge.net/p/ftm/code/3786 Author: diemo Date: 2022-10-06 16:24:15 +0000 (Thu, 06 Oct 2022) Log Message: ----------- fix the very last bug in ftm: crash with check_external_scopes/resolve_unresolved_scopes: an ftm external needs to be removed from the scopes table maxpat_check_external_hash when deleted, since this can happen before check_external_scopes, depending on loadbang order. Modified Paths: -------------- trunk/ftm/ftmlib/max5/ftmexternals.h trunk/ftm/ftmlib/max5/maxext.c trunk/ftm/ftmlib/max5/maxpat.c trunk/ftm/ftmlib/namedef.c Modified: trunk/ftm/ftmlib/max5/ftmexternals.h =================================================================== --- trunk/ftm/ftmlib/max5/ftmexternals.h 2022-10-06 12:04:54 UTC (rev 3785) +++ trunk/ftm/ftmlib/max5/ftmexternals.h 2022-10-06 16:24:15 UTC (rev 3786) @@ -531,6 +531,7 @@ FTS_API fts_scope_t *maxpat_new_scope(t_object *maxpat); FTS_API void maxpat_fix_scope(ftmext_t *ext, fts_scope_t *scope); FTS_API void maxpat_register_new_external(ftmext_t *ext); +FTS_API void maxpat_unregister_external(ftmext_t *ext); FTS_API void maxpat_is_closing(void); FTS_API int maxext_is_loading(void); Modified: trunk/ftm/ftmlib/max5/maxext.c =================================================================== --- trunk/ftm/ftmlib/max5/maxext.c 2022-10-06 12:04:54 UTC (rev 3785) +++ trunk/ftm/ftmlib/max5/maxext.c 2022-10-06 16:24:15 UTC (rev 3786) @@ -32,9 +32,11 @@ /* debug scope console printouts */ #ifndef WIN32 -#define debug_post(args...) -//#define debug_post(args...) post(args) -//#define debug_post(args...) printf(args); puts("\n") +# if !defined(DEBUG) || DEBUG == 0 || defined(NDEBUG) +# define debug_post(args...) {} /*empty*/ +# else +# define debug_post(args...) printf(args); puts("\n") //post(args) +# endif #else static void debug_post(const char *format, ...){} #endif @@ -929,6 +931,8 @@ void maxext_delete(ftmext_t *ext) { + debug_post("maxext_delete %p", ext); + maxpat_unregister_external(ext); maxext_delete_dsp(ext); /* should be first!! */ maxext_delete_alarm(ext); maxext_delete_inlets(ext); Modified: trunk/ftm/ftmlib/max5/maxpat.c =================================================================== --- trunk/ftm/ftmlib/max5/maxpat.c 2022-10-06 12:04:54 UTC (rev 3785) +++ trunk/ftm/ftmlib/max5/maxpat.c 2022-10-06 16:24:15 UTC (rev 3786) @@ -26,8 +26,11 @@ /* debug scope console printouts */ #ifndef WIN32 -#define debug_post(args...) -//#define debug_post(args...) printf(args); puts("\n") //post(args) +# if !defined(DEBUG) || DEBUG == 0 || defined(NDEBUG) +# define debug_post(args...) {} /*empty*/ +# else +# define debug_post(args...) printf(args); puts("\n") //post(args) +#endif #else static void debug_post(const char *format, ...){} #endif @@ -245,7 +248,7 @@ debug_post("--> destroy empty scope %p", scope); fts_object_release((fts_object_t *)scope); /* let down */ } - } + } // end while iter unresolved_scope_hash /* reset hastable of unresolved scopes */ fts_hashtable_clear(&unresolved_scope_hash); @@ -664,8 +667,6 @@ fts_iterator_t iter; fts_atom_t k, v; - debug_post("check_external_scopes"); - /* iterate over all unresolved scopes */ fts_hashtable_get_keys(&maxpat_check_external_hash, &iter); while(fts_iterator_has_more(&iter)) @@ -679,8 +680,12 @@ /* get scope with unresolved Max patcher */ ext = (ftmext_t *)fts_get_pointer(&k); + debug_post("check_external_scopes: try ext %p", ext); + if(!NOGOOD(ext)) { + debug_post("check_external_scopes: ext %p ok", ext); + ext_scope = ftmext_get_scope(ext); toplevel = maxpat_get_toplevel(ext->head.patcher); scope = toplevel_lookup_scope(toplevel); @@ -708,6 +713,10 @@ fts_hashtable_put(&maxpat_fixfile_hash, &k, &v); } } + else + { // ext is NOGOOD! + debug_post("check_external_scopes: ext %p NOGOOD!!!", ext); + } } /* reset hastable of unresolved scopes */ @@ -745,8 +754,23 @@ fts_set_pointer(&k, ext); fts_hashtable_put(&maxpat_check_external_hash, &k, fts_null); + debug_post("maxpat_register_new_external: %p", ext); } +void maxpat_unregister_external (ftmext_t *ext) +{ // when ftm external disappears, check if it was still in external scope hash, remove it + if (fts_hashtable_get_size(&maxpat_check_external_hash) > 0) + { + fts_atom_t k; + + fts_set_pointer(&k, ext); + fts_hashtable_remove(&maxpat_check_external_hash, &k); + debug_post("maxpat_unregister_external: %p", ext); + } +} + + + /******************************************************** * * FTM RTE API Modified: trunk/ftm/ftmlib/namedef.c =================================================================== --- trunk/ftm/ftmlib/namedef.c 2022-10-06 12:04:54 UTC (rev 3785) +++ trunk/ftm/ftmlib/namedef.c 2022-10-06 16:24:15 UTC (rev 3786) @@ -31,9 +31,14 @@ #endif /* debug scope console printouts */ -//#define debug_post(args...) post(args) #ifndef WIN32 -#define debug_post(args...) +# if !defined(DEBUG) || DEBUG == 0 || defined(NDEBUG) +# define debug_post(args...) {} /* empty */ +// force debug print, otherwise crash????? +//# define debug_post(args...) post(args) +# else +# define debug_post(args...) post(args) +# endif #else static void debug_post(const char* format, ...){} #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2022-10-06 12:04:57
|
Revision: 3785 http://sourceforge.net/p/ftm/code/3785 Author: borghesi Date: 2022-10-06 12:04:54 +0000 (Thu, 06 Oct 2022) Log Message: ----------- maxpat.c: added check of ext as still alive oject (using NOGOOD), to avoid crash in check_external_scopes function Modified Paths: -------------- trunk/ftm/ftmlib/max5/maxpat.c Modified: trunk/ftm/ftmlib/max5/maxpat.c =================================================================== --- trunk/ftm/ftmlib/max5/maxpat.c 2022-10-05 22:00:45 UTC (rev 3784) +++ trunk/ftm/ftmlib/max5/maxpat.c 2022-10-06 12:04:54 UTC (rev 3785) @@ -679,31 +679,34 @@ /* get scope with unresolved Max patcher */ ext = (ftmext_t *)fts_get_pointer(&k); - ext_scope = ftmext_get_scope(ext); - toplevel = maxpat_get_toplevel(ext->head.patcher); - scope = toplevel_lookup_scope(toplevel); + if(!NOGOOD(ext)) + { + ext_scope = ftmext_get_scope(ext); + toplevel = maxpat_get_toplevel(ext->head.patcher); + scope = toplevel_lookup_scope(toplevel); - if(scope != ext_scope) - { - t_object *ext_scope_toplevel = fts_scope_get_reference(ext_scope); - t_object *fix_patcher = toplevel; + if(scope != ext_scope) + { + t_object *ext_scope_toplevel = fts_scope_get_reference(ext_scope); + t_object *fix_patcher = toplevel; - if(scope == NULL) - { - scope = scope_new(); - fts_scope_set_reference(scope, toplevel); - toplevel_register_scope(toplevel, scope); - } + if(scope == NULL) + { + scope = scope_new(); + fts_scope_set_reference(scope, toplevel); + toplevel_register_scope(toplevel, scope); + } - debug_post("--> fix scope of %s from %p (%s) to %p (%s) for toplevel %p)", ftmext_get_class_name(ext)->s_name, ext_scope, patcher_get_filename(ext_scope_toplevel)->s_name, scope, patcher_get_filename(toplevel)->s_name, toplevel); - maxpat_fix_scope(ext, scope); + debug_post("--> fix scope of %s from %p (%s) to %p (%s) for toplevel %p)", ftmext_get_class_name(ext)->s_name, ext_scope, patcher_get_filename(ext_scope_toplevel)->s_name, scope, patcher_get_filename(toplevel)->s_name, toplevel); + maxpat_fix_scope(ext, scope); - if(patcher_is_parent_of(toplevel, ext_scope_toplevel)) - fix_patcher = ext_scope_toplevel; + if(patcher_is_parent_of(toplevel, ext_scope_toplevel)) + fix_patcher = ext_scope_toplevel; - fts_set_symbol(&k, patcher_get_filepath(fix_patcher)); - fts_set_pointer(&v, fix_patcher); - fts_hashtable_put(&maxpat_fixfile_hash, &k, &v); + fts_set_symbol(&k, patcher_get_filepath(fix_patcher)); + fts_set_pointer(&v, fix_patcher); + fts_hashtable_put(&maxpat_fixfile_hash, &k, &v); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bor...@us...> - 2022-10-05 22:00:47
|
Revision: 3784 http://sourceforge.net/p/ftm/code/3784 Author: borghesi Date: 2022-10-05 22:00:45 +0000 (Wed, 05 Oct 2022) Log Message: ----------- ffvec: fixed init bug in get_min_max_in_range Modified Paths: -------------- trunk/ftm/ftmlib/classes/fvec.c Modified: trunk/ftm/ftmlib/classes/fvec.c =================================================================== --- trunk/ftm/ftmlib/classes/fvec.c 2022-10-05 20:34:14 UTC (rev 3783) +++ trunk/ftm/ftmlib/classes/fvec.c 2022-10-05 22:00:45 UTC (rev 3784) @@ -547,7 +547,7 @@ { if(size > 0 && start < size && start >= 0) { - float min = ptr[start]; + float min = ptr[stride*start]; int i; int num = (start+range >= size) ? size-start : range; @@ -569,7 +569,7 @@ { if(size > 0 && start < size && start >= 0) { - float max = ptr[start]; + float max = ptr[stride*start]; int i; int num = (start+range >= size) ? size-start : range; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |