• 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: Iterating through audio data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterating through audio data


  • Subject: Re: Iterating through audio data
  • From: James Chandler Jr <email@hidden>
  • Date: Thu, 26 May 2011 18:12:06 -0400
  • Importance: Normal

Thanks Brian

That sounds like an excellent idea to use the sample-rate converter to upsample and draw audio zoomed in at less than 1 sample per pixel.

I don't know how many samples that a sample-rate converter could downsample "batch" before the graphic becomes too full of errors to be useful.

For instance, to display a 3 minute, 44.1K song within 1000 horizontal pixels (180 ms per pixel)-- One would resample from a rate of 44100.0 down to a rate of 5.56. The resampled output Nyquist would be 2.78 Hz and the audio window would show a blank line. All details of interest would have been brickwall-filtered.

In some cases even a small amount of downsampling might give unexpected results.

For instance, on a dainty finger cymbal, if we downsample even by a factor of two, then the graphic representation would be horribly wrong. The downsampling would have knocked out too many high harmonics to remain an accurate display.

Thanks

James Chandler Jr.

-----Original Message----- From: Brian Willoughby
Sent: Thursday, May 26, 2011 5:17 PM
To: email@hidden Audio
Subject: Re: Iterating through audio data


Note that Apple's AudioConverter can produce this smoothed waveform,
provided to set the output sample rate to match the screen pixels.
When zoomed out and viewing multiple samples per pixel, the
AudioConverter would be downsampling.  When zoomed in and stretching
samples out across a several-pixel gap, the AudioConverter would be
upsampling.  In either case, the output data from the converter
should be a very accurate representation of the audio signal.

Brian Willoughby
Sound Consulting


On May 26, 2011, at 06:02, James Chandler Jr wrote:
When the user finally zooms in so close that there are fewer than 1 samples per pixel, then you have to start drawing "connect the dots" waveform lines interpolating a smooth line connecting the sample dots.


There are various ways to smooth the line connecting the dots. Some methods are faster and some methods are more accurate. The most ideal would be a method which draws on-screen as similar as possible to what the audio ought to look like after it has passed thru an audio output D/A converter. The best view would look like the band limited continuous signal being output from the soundcard D/A converter.


_______________________________________________
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 

_______________________________________________
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


  • Follow-Ups:
    • Re: Iterating through audio data
      • From: Brian Willoughby <email@hidden>
References: 
 >Iterating through audio data (From: GW Rodriguez <email@hidden>)
 >Re: Iterating through audio data (From: Brian Willoughby <email@hidden>)
 >Re: Iterating through audio data (From: GW Rodriguez <email@hidden>)
 >Re: Iterating through audio data (From: James Chandler Jr <email@hidden>)
 >Re: Iterating through audio data (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: [ios] graph init and start in separate thread
  • Next by Date: Re: Iterating through audio data
  • Previous by thread: Re: Iterating through audio data
  • Next by thread: Re: Iterating through audio data
  • Index(es):
    • Date
    • Thread