• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Glissando: smoothing touch drags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Glissando: smoothing touch drags


  • Subject: Re: Glissando: smoothing touch drags
  • From: Richard Dobson <email@hidden>
  • Date: Tue, 14 Feb 2012 23:56:56 +0000

On 14/02/2012 21:51, Jean-François Brouillet wrote:
Think of a glissando or portamento effect as the user moves a finger
along some key.
...
But if I move the finger "fast enough", I hear discontinuities, and I
guess I understand why. When the finger moves "slowly" over, say 200
pixels/points my [0..1] range is divided into about 20ish steps
resulting in

..

What I am thinking of is "smoothing" those values (which will
introduce some latency of course) as follows: start an NSTimer to
kick in at about twice the rate of the AU callback,

My thought is that that is way over the top as a solution, and probably not all that effective anyway. This is a standard "dezippering" task, common to all Gui-controlled sound processing. The equally standard solution is to run the incoming control values through a simple recursive low-pass filter; or, more or less equivalently, filter the final computed values of frequency, amplitude, whichever it is. A typical example is the "port" opcode in Csound, which as its name suggests generates a portamento from one value to the next, at whatever update rate you specify. Sometimes a simple computed simple linear ramp is enough, if the hard corners when the direction changes have no ill effects. Of course, if the user does generate extreme shifts, they must expect some sort of side-effect; but using a true filter will mitigate all but the worst excesses of misuse. It has to be tested under automation, as users can draw all sorts of mad "impossible" shapes and expect them to be rendered promptly and cleanly.

And needless to say you do this in the callback itself.

Richard Dobson


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Glissando: smoothing touch drags (From: Jean-François Brouillet <email@hidden>)

  • Prev by Date: Re: Glissando: smoothing touch drags
  • Next by Date: sample rate & noise issue while playing the audio stream
  • Previous by thread: Re: Glissando: smoothing touch drags
  • Next by thread: Re: Glissando: smoothing touch drags
  • Index(es):
    • Date
    • Thread