diff --git a/protosynth/protosynth_dependencies/saike_proto_synth_fx.jsfx-inc b/protosynth/protosynth_dependencies/saike_proto_synth_fx.jsfx-inc index bddb268..b9440f6 100644 --- a/protosynth/protosynth_dependencies/saike_proto_synth_fx.jsfx-inc +++ b/protosynth/protosynth_dependencies/saike_proto_synth_fx.jsfx-inc @@ -215,18 +215,18 @@ global( ); -function freq_shift_audio_rate(in, shift) +function freq_shift_audio_rate(in, shift, fb) instance( - fs_l1, fs_r1, fs_l2, fs_r2, + fs_l1, fs_r1, fs_l2, fs_r2, ly, dt2, t2, ) local(ct2, st2) global(tpiT, fs.ct1, fs.st1) ( - t2 += 1.5771 + tpiT * shift; // oscillating at srate / 4 (2.0 * $pi * 0.251) + t2 += 1.5771 + tpiT * (shift + fb * ly); // oscillating at srate / 4 (2.0 * $pi * 0.251) (t2 > 628.32) ? t2 -= 628.32; // 200 * $pi; - fs_l1.quick_ellip(in * fs.ct1) * cos(t2) + fs_l2.quick_ellip(in * fs.st1) * sin(t2) + ly = fs_l1.quick_ellip(in * fs.ct1) * cos(t2) + fs_l2.quick_ellip(in * fs.st1) * sin(t2) ); function poisson_noise(in_left, in_right, freq, polarity) @@ -278,7 +278,7 @@ instance(lpf, lpf2, lpf3, lpf4, lpf5) -function process_phasemod(x1, x2, ifreq) +function process_phasemod(x1, x2, ifreq, feedback) local(y, y1, y2, y3, fm_factor) global(osc_feedback1, fm_offset, fm_scaling) instance(last_x1, last_x2, write_ptr, lpf, lpf2, y4) @@ -302,14 +302,15 @@ instance(last_x1, last_x2, write_ptr, lpf, lpf2, y4) fm_factor = fm_scaling * ifreq; - y1 = ; - y2 = ; - y3 = ; - y4 = ; + y1 = ; + y2 = ; + y3 = ; + y4 = ; this.elliptic_4x(y1); this.elliptic_4x(y2); this.elliptic_4x(y3); + this.elliptic_4x(y3); y = this.elliptic_4x(y4); last_x1 = x1; @@ -318,9 +319,9 @@ instance(last_x1, last_x2, write_ptr, lpf, lpf2, y4) y ); -function process_phasemod2(x1, x2, ifreq) +function process_phasemod2(x1, x2, ifreq, feedback) local(y, fm_factor, xx2, y1, y2, y3) -global(osc_feedback1, fm_offset, fm_scaling) +global(fm_offset, fm_scaling) instance(last_x1, last_x2, write_ptr, lpf, lpf2, lifreq, y4) ( this.buf1.write_simple_buffer(x1); @@ -328,10 +329,10 @@ instance(last_x1, last_x2, write_ptr, lpf, lpf2, lifreq, y4) xx2 = lpf2.eval_linearSVF_LP(lpf.eval_linearSVF_LP(x2)); - y1 = ; - y2 = ; - y3 = ; - y4 = ; + y1 = ; + y2 = ; + y3 = ; + y4 = ; this.elliptic_4x(y1); this.elliptic_4x(y2); @@ -344,7 +345,7 @@ instance(last_x1, last_x2, write_ptr, lpf, lpf2, lifreq, y4) y ); -function process_phasemod3(x1, x2, ifreq) +function process_phasemod3(x1, x2, ifreq, feedback) local(y, fm_factor, xx2, y1, y2, y3) global(osc_feedback1, fm_offset, fm_scaling) instance(last_x1, last_x2, write_ptr, lpf, lpf2, lifreq, y4) @@ -354,10 +355,10 @@ instance(last_x1, last_x2, write_ptr, lpf, lpf2, lifreq, y4) xx2 = lpf2.eval_linearSVF_LP(lpf.eval_linearSVF_LP(x2)); - y1 = ; - y2 = ; - y3 = ; - y4 = ; + y1 = ; + y2 = ; + y3 = ; + y4 = ; this.elliptic_4x(y1); this.elliptic_4x(y2); diff --git a/protosynth/protosynth_dependencies/saike_proto_synth_pixel_gfx.jsfx-inc b/protosynth/protosynth_dependencies/saike_proto_synth_pixel_gfx.jsfx-inc index 5e22f93..9cc7d93 100644 --- a/protosynth/protosynth_dependencies/saike_proto_synth_pixel_gfx.jsfx-inc +++ b/protosynth/protosynth_dependencies/saike_proto_synth_pixel_gfx.jsfx-inc @@ -683,6 +683,7 @@ instance( change_amount_modulated, display_value, _me, + bidi_slider, ) global( x_offset, y_offset, blit_scale, @@ -748,16 +749,26 @@ global( cap_mode = me; ); - ix = x + 2; - loop(floor(0.5 * (w - 3)), - (ix - x) <= floor(x_norm * w) ? ( - colormodel(color); - active ? (gfx_a = 0.6) : (gfx_a = 0.2) + bidi_slider ? ( + ix = x + 2; + colormodel(color); + (x_norm > 0.5) ? ( + gfx_rect(x + 0.5 * w, y + 2, 0.5 * x_norm * w - 2, 1); ) : ( - gfx_set(0, 0, 0, 0.2); + gfx_rect(x + x_norm * w + 2, y + 2, floor((0.5 - x_norm) * w - 0.0001), 1); + ); + ) : ( + ix = x + 2; + loop(floor(0.5 * (w - 3)), + (ix - x) <= floor(x_norm * w) ? ( + colormodel(color); + active ? (gfx_a = 0.6) : (gfx_a = 0.2) + ) : ( + gfx_set(0, 0, 0, 0.2); + ); + gfx_line(ix, y + 2, ix, y + h - 3); + ix += 2; ); - gfx_line(ix, y + 2, ix, y + h - 3); - ix += 2; ); ((cap_mode == me) || change_amount_modulated) ? ( diff --git a/protosynth/saike_protosynth.jsfx b/protosynth/saike_protosynth.jsfx index d40df0c..dbc2f98 100644 --- a/protosynth/saike_protosynth.jsfx +++ b/protosynth/saike_protosynth.jsfx @@ -99,6 +99,15 @@ slider163:f4_keyfollow=0<0,1,0.00001>-Output Key follow par += 1; i += 1; ); ?> + +slider239:fb1=0<-0.999,0.999,.0001>-fb1 +slider240:fb2=0<-0.999,0.999,.0001>-fb2 +slider241:fb3=0<-0.999,0.999,.0001>-fb3 +slider242:fb4=0<-0.999,0.999,.0001>-fb4 +slider243:fb21=0<-0.999,0.999,.0001>-fb21 +slider244:fb22=0<-0.999,0.999,.0001>-fb22 +slider245:fb31=0<-0.999,0.999,.0001>-fb31 + slider246:glide_time=100<3,3000,0.001:log>-glide time slider247:poisson_freq=500<20, 10000, 0.01:log>-poisson_freq @@ -241,6 +250,14 @@ poisson_slider.init_slider_ui(247, 20, 10000, 1); time_slider.init_slider_ui(248, 5, 2800, 1); verb_mix_slider.init_slider_ui(249, 0, 1, 0); + @@ -781,10 +799,10 @@ instance( : (mix_mode%d == 3) ? (min(max(o%d, o%d), min(o%d, o%d))) : (mix_mode%d == 4) ? (t1 = o%d + o%d; t2 = o%d - o%d; min(max(t1, t2), -min(t1, t2))) : (mix_mode%d == 5) ? (mix%d.process_stft_mixer(o%d, o%d); mix%d.out_left) - : (mix_mode%d == 6) ? (this.ofs%d.freq_shift_audio_rate(o%d, 16 * this.freq * o%d)) - : (mix_mode%d == 7) ? (mix%d.process_phasemod(o%d, o%d, osc%d.current_ifreq)) - : (mix_mode%d == 8) ? (mix%d.process_phasemod2(o%d, o%d, osc%d.current_ifreq)) - : (mix_mode%d == 9) ? (mix%d.process_phasemod3(o%d, o%d, osc%d.current_ifreq)); + : (mix_mode%d == 6) ? (this.ofs%d.freq_shift_audio_rate(o%d, 16 * this.freq * o%d, this.freq * fb%d)) + : (mix_mode%d == 7) ? (mix%d.process_phasemod(o%d, o%d, osc%d.current_ifreq, fb%d)) + : (mix_mode%d == 8) ? (mix%d.process_phasemod2(o%d, o%d, osc%d.current_ifreq, fb%d)) + : (mix_mode%d == 9) ? (mix%d.process_phasemod3(o%d, o%d, osc%d.current_ifreq, fb%d)); ", mix_out, mix_id, o1, o2, @@ -793,10 +811,10 @@ instance( mix_id, o1, o2, o1, o2, mix_id, o1, o2, o1, o2, mix_id, mix_id, o1, o2, mix_id, - mix_id, mix_id, o1, o2, - mix_id, mix_id, o1, o2, o1, - mix_id, mix_id, o1, o2, o1, - mix_id, mix_id, o1, o2, o1 + mix_id, mix_id, o1, o2, mix_id, + mix_id, mix_id, o1, o2, o1, mix_id, + mix_id, mix_id, o1, o2, o1, mix_id, + mix_id, mix_id, o1, o2, o1, mix_id ); ); ?> @@ -1026,7 +1044,7 @@ verb.reset_verb(); midi.reset_midi(); -CURRENT_VERSION = 11; +CURRENT_VERSION = 12; version = CURRENT_VERSION; @serialize @@ -1174,6 +1192,10 @@ f_morph_slider4.serialize_if(version, 8); reverb_algorithm = 0; ); +(version < 12) ? ( + fb1 = fb2 = fb3 = fb4 = fb21 = fb22 = fb31 = 0; +); + version = CURRENT_VERSION; @slider @@ -1788,6 +1810,8 @@ global(gfx_a, gfx_x, gfx_y, mouse_x, mouse_y, x_offset, y_offset, blit_scale, ca ); ); ); + + ); function cline(x1, y1, x2, y2) @@ -1807,18 +1831,24 @@ cy = start; over_filter = 0; over_osc = 0; +mnode = 1; //input_size = +function has_feedback(v) +( + (v > 5) && (v < 10); +); + cx = left_side + block_size + spacing; cy = start + 0.5 * (block_size + 2); // LAST @@ -1826,8 +1856,15 @@ cy = start + 0.5 * (block_size + 2); current_slider = 128; /* First mix slider */ loop(i=0;4, printf("n2%d.mix_node(cx, cy, 2 * block_size + 2, block_size, %d);", i, current_slider); + + printf("has_feedback(mix_mode%d) ? (", i + 1); + printf("f_fb_slider%d.active = 1;", mnode); + printf("f_fb_slider%d.color = 0.1;", mnode); + printf("f_fb_slider%d.text_slider_ui(%d, cx, cy + block_size + 1, 2 * block_size + 2, 5, \"\", \"Feedback\", sprintf(1, \"Feedbk (%%d)\", 100 * f_fb_slider%d.display_value));", mnode, uuid(), mnode); + printf(");", i); + printf("cy += 2 * (block_size + 2);"); - i += 1; + i += 1; mnode += 1; current_slider += 1; ); ?> @@ -1838,8 +1875,15 @@ cy = start + 0.5 * 3 * (block_size + 2); @@ -1861,6 +1905,15 @@ cx = left_side + 7 * block_size + 4 * spacing; cy = start + 3.5 * (block_size + 2); n5.mix_node(cx, cy, 2 * block_size + 2, block_size, 134); + + cy += 4 * (block_size + 2); cx += 2 * block_size + spacing; cy = start + 3.5 * (block_size + 2);