From cfdcc3687d4e982f55723e60f00fb9b730b82eea Mon Sep 17 00:00:00 2001 From: TiagoLr Date: Wed, 13 Dec 2023 18:59:49 +0000 Subject: [PATCH 1/2] Release JSAdditiv v1.1.1 Fix read initial wave file --- Synth/tilr_JSAdditiv.jsfx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Synth/tilr_JSAdditiv.jsfx b/Synth/tilr_JSAdditiv.jsfx index c8d2570..e40a2b4 100644 --- a/Synth/tilr_JSAdditiv.jsfx +++ b/Synth/tilr_JSAdditiv.jsfx @@ -1,6 +1,7 @@ desc: JSAdditiv author: tilr -version: 1.1 +version: 1.1.1 +changelog: Fix read initial wave file provides: tilr_JSAdditiv/add.adsr.jsfx-inc tilr_JSAdditiv/add.array.jsfx-inc @@ -50,7 +51,7 @@ about: desc: JSAdditiv tags: synth, instrument -slider1:/tilr_JSAdditiv:Sine 1.wav:Wave +slider1:/tilr_JSAdditiv:none:Wave slider2:vol=80<0, 100, .01>-Volume slider4:_uni_voices=1<1, 8, 1>-Unison voices slider5:uni_detune=15<0, 100, 0.1>-Unison detune @@ -88,6 +89,7 @@ import add.fft_real_synth.jsfx-inc options:gfx_hz=60 no_meter @init +lfile = -1; wavebuf = 100000; wavechn = 0; wavelen = 0; @@ -182,8 +184,7 @@ function resynthesize() ( semi_normalize_wave(wavebuf, wavelen); // correct signal strenght after summing frequencies ); -function on_file_change () ( - filehandle=file_open(slider1); +function read_file(filehandle) ( filehandle > 0 ? ( file_riff(filehandle, wavechn, wavesrate); wavechn ? ( @@ -203,6 +204,17 @@ function on_file_change () ( ); ); +function on_file_change() ( + lfile = slider1; + filehandle=file_open(slider1); + read_file(filehandle); +); + +function read_file_string(str) ( + filehandle=file_open(str); + read_file(filehandle); +); + // copy filter coeficients from buffer1 to buffer2 function filter_copy_coefs(buf1, buf2) ( buf2[2] = buf1[2]; @@ -270,6 +282,9 @@ function on_slider() ( detune_amt = uni_detune / 100 * 3 / srate; // 3 hz max detune ); +// FIX - read initial wave from string instead of slider +read_file_string("tilr_JSAdditiv/Sine 1.wav"); + @serialize file_var(0, osc_free); file_mem(0, wavebuf, wavelen + four.size * 4); From 7a3db25756342ed6ed80e05bac98ddafab4edc02 Mon Sep 17 00:00:00 2001 From: TiagoLr Date: Wed, 13 Dec 2023 19:35:39 +0000 Subject: [PATCH 2/2] Update tilr_JSAdditiv.jsfx --- Synth/tilr_JSAdditiv.jsfx | 1 + 1 file changed, 1 insertion(+) diff --git a/Synth/tilr_JSAdditiv.jsfx b/Synth/tilr_JSAdditiv.jsfx index e40a2b4..d98728e 100644 --- a/Synth/tilr_JSAdditiv.jsfx +++ b/Synth/tilr_JSAdditiv.jsfx @@ -89,6 +89,7 @@ import add.fft_real_synth.jsfx-inc options:gfx_hz=60 no_meter @init +ext_noinit = 1; lfile = -1; wavebuf = 100000; wavechn = 0;