Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release JSAdditiv v1.1.1 #350

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions Synth/tilr_JSAdditiv.jsfx
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -88,6 +89,8 @@ import add.fft_real_synth.jsfx-inc
options:gfx_hz=60 no_meter

@init
ext_noinit = 1;
lfile = -1;
wavebuf = 100000;
wavechn = 0;
wavelen = 0;
Expand Down Expand Up @@ -182,8 +185,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 ? (
Expand All @@ -203,6 +205,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];
Expand Down Expand Up @@ -270,6 +283,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);
Expand Down
Loading