diff --git a/app/server/sonicpi/lib/sonicpi/synths/synthinfo.rb b/app/server/sonicpi/lib/sonicpi/synths/synthinfo.rb index 8ecf9ce123..6cedde2b6a 100644 --- a/app/server/sonicpi/lib/sonicpi/synths/synthinfo.rb +++ b/app/server/sonicpi/lib/sonicpi/synths/synthinfo.rb @@ -4908,6 +4908,56 @@ def specific_arg_info end end + class FXVowel < FXInfo + def name + "Vowel" + end + + def introduced + Version.new(2,10,0) + end + + def synth_name + "fx_vowel" + end + + def arg_defaults + { + :amp => 1, + :amp_slide => 0, + :amp_slide_shape => 1, + :amp_slide_curve => 0, + :pre_amp => 1, + :pre_amp_slide => 0, + :pre_amp_slide_shape => 1, + :pre_amp_slide_curve => 0, + :vowel_sound => 1, + :voice => 0 + } + end + + def specific_arg_info + { + :vowel_sound => + { + :doc => "1,2,3,4,5 => A,E,I,O,U", + :validations => [v_one_of(:vowel_sound, [1,2,3,4,5])], + :modulatable => true + }, + :voice => + { + :doc => "0,1,2,3,4 => Soprano,Alto,Counter Tenor, Tenor, Bass", + :validations => [v_one_of(:voice, [0,1,2,3,4])], + :modulatable => true + } + } + end + + def doc + "This effect filters the input to match a human voice singing a certain vowel sound. Human singing voice sounds are easily achieved with a source of a saw wave with a little vibrato." + end + end + class FXOctaver < FXInfo def name "Octaver" @@ -6411,6 +6461,7 @@ class BaseInfo :fx_ring_mod => FXRingMod.new, #:fx_chorus => FXChorus.new, :fx_octaver => FXOctaver.new, + :fx_vowel => FXVowel.new, :fx_flanger => FXFlanger.new } diff --git a/etc/synthdefs/compiled/sonic-pi-fx_vowel.scsyndef b/etc/synthdefs/compiled/sonic-pi-fx_vowel.scsyndef new file mode 100644 index 0000000000..533f0d2db4 Binary files /dev/null and b/etc/synthdefs/compiled/sonic-pi-fx_vowel.scsyndef differ diff --git a/etc/synthdefs/designs/sonic_pi/synths/fx.clj b/etc/synthdefs/designs/sonic_pi/synths/fx.clj index 97e7858a97..82527df67e 100644 --- a/etc/synthdefs/designs/sonic_pi/synths/fx.clj +++ b/etc/synthdefs/designs/sonic_pi/synths/fx.clj @@ -18,6 +18,133 @@ (without-namespace-in-synthdef + (defsynth sonic-pi-fx_vowel + [amp 1 + amp_slide 0 + amp_slide_shape 1 + amp_slide_curve 0 + mix 1 + mix_slide 0 + mix_slide_shape 1 + mix_slide_curve 0 + voice 0 + vowel_sound 1 + pre_amp 1 + pre_amp_slide 0 + pre_amp_slide_shape 1 + pre_amp_slide_curve 0 + in_bus 0 + out_bus 0] + (let [amp (varlag amp amp_slide amp_slide_curve amp_slide_shape) + pre_amp (varlag pre_amp pre_amp_slide pre_amp_slide_curve pre_amp_slide_shape) + mix (varlag mix mix_slide mix_slide_curve mix_slide_shape) + freqs [800, 1150, 2900, 3900, 4950 + 350, 2000, 2800, 3600, 4950 + 270, 2140, 2950, 3900, 4950 + 450, 800, 2830, 3800, 4950 + 325, 700, 2700, 3800, 4950 + 800, 1150, 2800, 3500, 4950 + 400, 1600, 2700, 3300, 4950 + 350, 1700, 2700, 3700, 4950 + 450, 800, 2830, 3500, 4950 + 325, 700, 2530, 3500, 4950 + 660, 1120, 2750, 3000, 3350 + 440, 1800, 2700, 3000, 3300 + 270, 1850, 2900, 3350, 3590 + 430, 820, 2700, 3000, 3300 + 370, 630, 2750, 3000, 3400 + 650, 1080, 2650, 2900, 3250 + 400, 1700, 2600, 3200, 3580 + 290, 1870, 2800, 3250, 3540 + 400, 800, 2600, 2800, 3000 + 350, 600, 2700, 2900, 3300 + 600, 1040, 2250, 2450, 2750 + 400, 1620, 2400, 2800, 3100 + 250, 1750, 2600, 3050, 3340 + 400, 750, 2400, 2600, 2900 + 350, 600, 2400, 2675, 2950] + amps [1.0 0.5011872336272722 0.025118864315095784 0.09999999999999998 0.0031622776601683764 + 1.0 0.09999999999999998 0.17782794100389226 0.009999999999999995 0.0015848931924611136 + 1.0 0.251188643150958 0.050118723362727206 0.050118723362727206 0.006309573444801925 + 1.0 0.2818382931264453 0.0794328234724281 0.0794328234724281 0.0031622776601683764 + 1.0 0.1584893192461113 0.017782794100389226 0.009999999999999995 9.999999999999994E-4 + 1.0 0.6309573444801931 0.09999999999999998 0.015848931924611127 9.999999999999994E-4 + 1.0 0.06309573444801932 0.031622776601683784 0.017782794100389226 9.999999999999994E-4 + 1.0 0.09999999999999998 0.031622776601683784 0.015848931924611127 9.999999999999994E-4 + 1.0 0.3548133892335754 0.1584893192461113 0.03981071705534973 0.001778279410038922 + 1.0 0.251188643150958 0.031622776601683784 0.009999999999999995 6.309573444801923E-4 + 1.0 0.5011872336272722 0.07079457843841379 0.06309573444801932 0.012589254117941666 + 1.0 0.19952623149688797 0.12589254117941667 0.09999999999999998 0.09999999999999998 + 1.0 0.06309573444801932 0.06309573444801932 0.015848931924611127 0.015848931924611127 + 1.0 0.3162277660168379 0.050118723362727206 0.0794328234724281 0.019952623149688792 + 1.0 0.09999999999999998 0.07079457843841379 0.031622776601683784 0.019952623149688792 + 1.0 0.5011872336272722 0.44668359215096315 0.3981071705534972 0.0794328234724281 + 1.0 0.19952623149688797 0.251188643150958 0.19952623149688797 0.09999999999999998 + 1.0 0.17782794100389226 0.12589254117941667 0.09999999999999998 0.031622776601683784 + 1.0 0.3162277660168379 0.251188643150958 0.251188643150958 0.050118723362727206 + 1.0 0.09999999999999998 0.14125375446227542 0.19952623149688797 0.050118723362727206 + 1.0 0.44668359215096315 0.3548133892335754 0.3548133892335754 0.09999999999999998 + 1.0 0.251188643150958 0.3548133892335754 0.251188643150958 0.12589254117941667 + 1.0 0.031622776601683784 0.1584893192461113 0.0794328234724281 0.03981071705534973 + 1.0 0.2818382931264453 0.08912509381337454 0.09999999999999998 0.009999999999999995 + 1.0 0.09999999999999998 0.025118864315095784 0.03981071705534973 0.015848931924611127] + bws [1/80 1/90 1/120 1/130 1/140 + 1/60 1/100 1/120 1/150 1/200 + 1/60 1/90 1/100 1/120 1/120 + 1/70 1/80 1/100 1/130 1/135 + 1/50 1/60 1/170 1/180 1/200 + 1/80 1/90 1/120 1/130 1/140 + 1/60 1/80 1/120 1/150 1/200 + 1/50 1/100 1/120 1/150 1/200 + 1/70 1/80 1/100 1/130 1/135 + 1/50 1/60 1/170 1/180 1/200 + 1/80 1/90 1/120 1/130 1/140 + 1/70 1/80 1/100 1/120 1/120 + 1/40 1/90 1/100 1/120 1/120 + 1/40 1/80 1/100 1/120 1/120 + 1/40 1/60 1/100 1/120 1/120 + 1/80 1/90 1/120 1/130 1/140 + 1/70 1/80 1/100 1/120 1/120 + 1/40 1/90 1/100 1/120 1/120 + 1/40 1/80 1/100 1/120 1/120 + 1/40 1/60 1/100 1/120 1/120 + 1/60 1/70 1/110 1/120 1/130 + 1/40 1/80 1/100 1/120 1/120 + 1/60 1/90 1/100 1/120 1/120 + 1/40 1/80 1/100 1/120 1/120 + 1/40 1/80 1/100 1/120 1/120] + ;; voice is 0 indexed, vowel_sound is 1 indexed + vowel_freq_one (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 5)) freqs) + vowel_freq_two (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 4)) freqs) + vowel_freq_three (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 3)) freqs) + vowel_freq_four (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 2)) freqs) + vowel_freq_five (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 1)) freqs) + vowel_amp_one (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 5)) amps) + vowel_amp_two (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 4)) amps) + vowel_amp_three (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 3)) amps) + vowel_amp_four (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 2)) amps) + vowel_amp_five (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 1)) amps) + vowel_bw_one (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 5)) bws) + vowel_bw_two (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 4)) bws) + vowel_bw_three (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 3)) bws) + vowel_bw_four (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 2)) bws) + vowel_bw_five (select:kr (+ (* 5 voice) (- (* 5 vowel_sound) 1)) bws) + amp-fudge 5 + [in-l in-r] (* (* amp-fudge pre_amp) (in in_bus 2)) + new-l (+ (b-band-pass in-l vowel_freq_one (* vowel_bw_one vowel_amp_one)) + (b-band-pass in-l vowel_freq_two (* vowel_bw_two vowel_amp_two)) + (b-band-pass in-l vowel_freq_three (* vowel_bw_three vowel_amp_three)) + (b-band-pass in-l vowel_freq_four (* vowel_bw_four vowel_amp_four)) + (b-band-pass in-l vowel_freq_five (* vowel_bw_five vowel_amp_five))) + new-r (+ (b-band-pass in-r vowel_freq_one (* vowel_bw_one vowel_amp_one)) + (b-band-pass in-r vowel_freq_two (* vowel_bw_two vowel_amp_two)) + (b-band-pass in-r vowel_freq_three (* vowel_bw_three vowel_amp_three)) + (b-band-pass in-r vowel_freq_four (* vowel_bw_four vowel_amp_four)) + (b-band-pass in-r vowel_freq_five (* vowel_bw_five vowel_amp_five))) + fin-l (x-fade2 in-l new-l (- (* mix 2) 1) (* amp-fudge amp)) + fin-r (x-fade2 in-r new-r (- (* mix 2) 1) (* amp-fudge amp))] + (out out_bus [fin-l fin-r]))) + (defsynth sonic-pi-fx_krush [amp 1 amp_slide 0 @@ -1604,4 +1731,4 @@ (core/save-synthdef sonic-pi-fx_ring_mod) (core/save-synthdef sonic-pi-fx_octaver) (core/save-synthdef sonic-pi-fx_flanger) - ) + (core/save-synthdef sonic-pi-fx_vowel))