• 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: [OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?)


  • Subject: Re: [OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?)
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 25 Jun 2007 14:30:36 -0400

On 6/25/07, Alastair Houghton <email@hidden> wrote:
No, no, no!  :-)  You *can't* do that, as I already pointed out.
You'll display totally the wrong thing if you pick every Nth sample.
I've lost count of the number of freeware/shareware audio apps
(across various systems) that do that.

Well, nobody ever claimed all my ideas are bright ones ... It does save my ego just a *bit* of bruising to know my mistake isn't all that uncommon, though. :-D I admit I skimmed much of this thread. Bad list member, BAD!

and that line of samples might move up and down depending on where I
scroll to (it does in some programs I've seen).  You can get many
other similarly unpleasant effects this way (I chose an extreme
example deliberately).

I admit I'm having trouble visualizing what you're describing, but I do have a vague notion of the problem it presents now that you mention it. This is getting off-topic for Cocoa, but if you feel like it, I'd *very much welcome* a more detailed / alternate explanation off-list (including Hans since it may or may not benefit him as well). I have an in-house application that manipulates voice recordings which sometimes have lengthy silences and it's been suggested before that I add a waveform view, though the actual utility of such a thing in my case is questionable ... :-/

>  Also, for efficiency, only plot the samples that are visible
> on-screen (and the one before and the one after to allow lines to the
> previous-and-next clipped points).

Yes, that's certainly a good idea.  It'd be crazy to plot the entire
waveform each time, though if you're buffering it to a bitmap then
you might take that approach.

As mentioned previously, it's best just to start with simple drawing code then get trickier if performance calls for it.

--
I.S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Best drawing technology for audio waveforms, envelopes, etc.? (From: "Hans Kuder" <email@hidden>)
 >Re: Best drawing technology for audio waveforms, envelopes, etc.? (From: Alastair Houghton <email@hidden>)
 >Re: Best drawing technology for audio waveforms, envelopes, etc.? (From: "Hans Kuder" <email@hidden>)
 >Re: Best drawing technology for audio waveforms, envelopes, etc.? (From: "I. Savant" <email@hidden>)
 >[OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?) (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: [SOLVED] NSScrollView: General Question When does scrollRectToVisible does not scroll?
  • Next by Date: Re: int to NSString?
  • Previous by thread: [OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?)
  • Next by thread: Re: [OT] Don't draw every 10th sample(!) (Was Re: Best drawing technology for audio waveforms, envelopes, etc.?)
  • Index(es):
    • Date
    • Thread