sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.83k stars 922 forks source link

Vowel FX confusion, or, the uncanny valley of speech synthesis #1992

Open Phen-Ro opened 5 years ago

Phen-Ro commented 5 years ago

The built-in documentation for the Vowel FX reads, "Human singing voice sounds are easily achieved with a source of a saw wave with a little vibrato." I have not been able to achieve anything remotely "human" sounding, easily or otherwise. Is this FX broken, or am I using it the wrong way? Or perhaps the documentation exaggerates. Or perhaps we hang out with very different kinds of "humans".

By passing in random arguments to the FX and a synth, I can occasionally, briefly, generate something somewhat similar to Pink Trombone. Low notes seem to work best, for a very creepy value of best.

Here's an example of such a horror show. I don't recommend playing it out loud if children are present.

with_fx :vowel do |vowel|
  live_loop :test do
    #s = synth (ring :saw, :dsaw, :mod_saw, :supersaw).tick,
    s = synth :saw,
      note: (rrand 20, 70),
      release: 4

    8.times do
      control s, note_slide: 0.125, note: (rrand 20, 70)
      control vowel, vowel_sound: [1,2,3,4,5].choose, voice: [0,1,2,3,4].choose
      sleep 0.5
    end

  end
end

Is this what it's supposed to sound like? I'm using Sonic Pi 3.1.0 on Windows 10.

xavriley commented 5 years ago

The usefulness of this effect is indeed limited - I'm sorry if the marketing in the docs didn't live up to the hype.

I implemented it in this PR https://github.com/samaaron/sonic-pi/pull/961 As stated there, the main thing I was trying to do was imitate the vowel effect in TidalCycles. There's a very limited example of this here https://tidalcycles.org/patterns.html#composing_patterns The effect in that context is very subtle.

I think the issue here could be rephrased as "Update VowelFX docs with examples and known limitations". Short sounds with bursts of wide spectrums (like the the example you provided above) are likely to cause havoc with the resonances of the filters which is what gives that percussive click on each note change (I think).

Phen-Ro commented 5 years ago

I'd love to see some examples of how to use VowelFX!

What do you mean by "short sounds with bursts of wide spectrums"? Playing without the control still generates ringing sounds:

live_loop :test2 do
  with_fx :vowel, vowel_sound: [1,2,3,4,5].choose, voice: [0,1,2,3,4].choose do
    synth :saw,
      note: (rrand 20, 70),
      release: 1
  end
  sleep 1
end

Incidentally, while playing around further, it appears that vowel_sound and voice are turning the same knob, and possibly fighting over it.

5.times do |n|
  vowel_sound = n+1 # 1 through 5
  voice = n # 0 through 4
  with_fx :vowel, vowel_sound: vowel_sound do
    synth :saw
  end
  sleep 1
  with_fx :vowel, voice: voice do
    synth :saw
  end
  sleep 1
end
ethancrawford commented 3 years ago

@xavriley any further comments about this? is it worth you or @Phen-Ro creating a separate ticket or PR for suggested documentation updates as you mention above? do we still wish to keep this ticket open?

ethancrawford commented 3 years ago

@Phen-Ro - though we might not have any immediate solutions for improving the vowel fx, we are interested in rewriting it with an improved implementation at some point 🙂 See #2904 👍