On further inspection, though these are important devices, they don't solve the general problem of feedback.

The Delay* family will let you add a signal to a delayed copy of itself. You only ever hear two copies. The Comb* family can cause many copies of a signal to pile up on each other, truly feeding back -- but it doesn't let you stick anything in the feedback loop, so it can only sound like an echo.

A general feedback device has two inputs and two outputs. You input from signal I, "output" to the feedback loop L, input again from the feedback loop L, and finally output to device O. The signals from I and L are summed, and the signal path L includes a delay. The output of such a device can sound completely unlike its input.

This is how, for instance, a physical model of a plucked string works[1]. There's a brief burst of noise, which goes into a feedback loop with a LPF. The result sounds like a guitar string: it begins buzzy, and the high harmonics fade first, so that it gets mellower as it gets quieter. To me, that's like magic -- it turns white noise into a pitched signal!

I believe feedback is the basis of all the physical models -- pianos, bells, cello, saxophone, flute, xylophone ... a guitar held close to an amplifier ...

There is a Quark[2] that claims to make feedback in SuperCollider easy. I remember finding it a few years ago and just scratching my head. But that's how I felt about envelopes, too; it's therefore not necessarily a complicated library for someone who really understands SuperCollider ...

[1] https://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis

[2] https://github.com/supercollider-quarks/Feedback

On Sun, Jul 8, 2018 at 12:42 PM Jeffrey Brown <jeffbrown.the@gmail.com> wrote:
Thanks, Tom! SuperCollider must have simplified the way feedback works. This is a dream come true.

On Sun, Jul 8, 2018 at 12:29 PM <amindfv@gmail.com> wrote:
There are lots of options here, but they're straight from SC. Simplest:

delay1 - gives you the value of "in" from one sample ago
delay2 - same, but 2 samples
delayN - can specify number of seconds of delay, but don't modulate the amount (there'll be aliasing artifacts)
delayC or delayL - can modulate the amount

There's also "combC"/"combL"/"combN" which is closer to the electronic music definition of "delay" (a delay line with feedback).

so you might do something like

s3 <- s1 ~+ (delay1 (in_ s1) ~* s2
out 0 [s3,s3]

Tom


El 8 jul 2018, a las 11:53, Jeffrey Brown <jeffbrown.the@gmail.com> escribió:

Synthesizers with feedback can create some unbelievably beautiful sounds.

I wrote a tiny program (below) to try to make feedback. I knew it would not work, because once I tried to learn how to do feedback in SC, and it's more complicated than what I wrote. I never understood how to do it in SC. I'm hoping maybe it's easier in Vivid?

Below is an example of what I'm trying to do.

  {-# LANGUAGE DataKinds, ExtendedDefaultRules #-}
  
  import Vivid
  
  boop :: SynthDef '["f1","f2"]
  boop = sd (400::I"f1", 300::I"f2") $ do
     s1 <- 0.1 ~* sinOsc (freq_ (V::V"f1"))
     s2 <- s1 ~- (0.1 ~* sinOsc (freq_ (V::V"f2")) )
     s1 <- s1 ~* s2 -- This line does not do what is intended. Instead
       -- it creates a new signal called `s1` that masks the old one.
       -- (That's a property of do-notation, not a problem with Vivid.)
     out 0 [s1, s1]
  
  main :: IO ()
  main = do
     s <- synth boop ()
     wait 1
     free s

--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github   
_______________________________________________
Livecode mailing list -- livecode@we.lurk.org
To unsubscribe send an email to livecode-leave@we.lurk.org
_______________________________________________
Livecode mailing list -- livecode@we.lurk.org
To unsubscribe send an email to livecode-leave@we.lurk.org


--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github   


--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github