Number of Samples in a selection?

Author
gwp99
Max Output Level: -80 dBFS
  • Total Posts : 507
  • Joined: 2005/02/12 12:42:46
  • Location: Canada
  • Status: offline
2011/09/07 23:52:12 (permalink)

Number of Samples in a selection?

When highlighting a section of an audio track, with the Time Ruler=Samples, is there a way of viewing the Number of Samples in the selection?



  X1E-64bit, Windows 7 64-bit, Sonica Labs Hush QT- Intel Core 2 Quad Q6700 2.66G, 8GB  RAM, RME Fireface UFX (using Firewire), 3 eSata internal/many external hdd's    
#1

13 Replies Related Threads

    jinga8
    Max Output Level: -17 dBFS
    • Total Posts : 5817
    • Joined: 2004/02/14 21:45:01
    • Location: Oceanside, CA
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 00:34:17 (permalink)
    hmmm....interesting...I don't know the answer, unfortunately. Just curious, but why would you want to know this? I suppose the easiest way to figure it is to multiply the length of the selection (in seconds) by the sample rate (44,100 or 48,000 or 96,000 etc.), but you probably asked in order to avoid doing that...
    #2
    John
    Forum Host
    • Total Posts : 30467
    • Joined: 2003/11/06 11:53:17
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 01:04:58 (permalink)
    Jinga is that you? If it is; A Hardy Welcome Back. Great to see you here.

    Best
    John
    #3
    John
    Forum Host
    • Total Posts : 30467
    • Joined: 2003/11/06 11:53:17
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 01:12:32 (permalink)
    I don't think it can be easily determined. Even if you did a multiplication of time and length you would have to account for frequency. If its a sine wave yes it could be calculated but music is a complex wave form with multiple frequencies. I could be wrong though.    

    Best
    John
    #4
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 03:02:37 (permalink)
    Even if you did a multiplication of time and length you would have to account for frequency.



    I'm surprised to see you say that, John. I'm sure you know very well that sample rate is constant, and samples/second x seconds = samples.


    To the OP, it's a longstanidng complaint that you can't easily see the length of a selection in any units. You have to check the time or sample at the beginning  and end of the selection, and do the subtraction. Or you can split out the selection from a clip, and check the length in properties.


    It seems like such a simple feature to implement, I don't know why the Bakers continue to leave it out.

    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #5
    John
    Forum Host
    • Total Posts : 30467
    • Joined: 2003/11/06 11:53:17
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 03:28:35 (permalink)
    I'm surprised to see you say that, John. I'm sure you know very well that sample rate is constant, and samples/second x seconds = samples.
    I'm thinking about frequencies and that is not constant. A single frequency would have x number of samples at a given sampling frequency. However if a low frequency has also a high frequency along with it the total number of samples seems to me to vary. Don't you think? If for example a 20 kHz frequency is sampled one  sample is the result at 40 kHz sample frequency if a low frequency is also present in that time frame that low frequency is also sampled and and it should not be just one sample. The idea is if the low frequency is 1 Hz then at a 40 kHz sample frequency it should have a little less then 20,000 samples.

    Best
    John
    #6
    Bub
    Max Output Level: -3.5 dBFS
    • Total Posts : 7196
    • Joined: 2010/10/25 10:22:13
    • Location: Sneaking up behind you!
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 11:37:06 (permalink)
    brundlefly
    Even if you did a multiplication of time and length you would have to account for frequency.
    I'm surprised to see you say that, John. I'm sure you know very well that sample rate is constant, and samples/second x seconds = samples.
    +1

    "I pulled the head off Elvis, filled Fred up to his pelvis, yaba daba do, the King is gone, and so are you."
    #7
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 11:38:04 (permalink)
    John



    I'm surprised to see you say that, John. I'm sure you know very well that sample rate is constant, and samples/second x seconds = samples.
    I'm thinking about frequencies and that is not constant. A single frequency would have x number of samples at a given sampling frequency. However if a low frequency has also a high frequency along with it the total number of samples seems to me to vary. Don't you think? If for example a 20 kHz frequency is sampled one  sample is the result at 40 kHz sample frequency if a low frequency is also present in that time frame that low frequency is also sampled and and it should not be just one sample. The idea is if the low frequency is 1 Hz then at a 40 kHz sample frequency it should have a little less then 20,000 samples.
    You are apparently thinking in samples/cycle. But sample rates are in samples/second, and are constant. So, yes, a higher frequency signal has fewer samples representing each cycle, but as you know per Nyquist, two samples per cycle are all that is needed to perfectly reconstruct a signal component's frequency, amplitude and phase.

    EDIT: Is this a test? Or has John's brain been taken over by an alien life-form from planet Stair-step? 



    post edited by brundlefly - 2011/09/08 11:42:06

    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #8
    Bub
    Max Output Level: -3.5 dBFS
    • Total Posts : 7196
    • Joined: 2010/10/25 10:22:13
    • Location: Sneaking up behind you!
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 11:42:25 (permalink)
    So what is being represented when we zoom all the way in on a wav in Sonar and see the what looks like steps?

    "I pulled the head off Elvis, filled Fred up to his pelvis, yaba daba do, the King is gone, and so are you."
    #9
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 11:46:20 (permalink)
    So what is being represented when we zoom all the way in on a wav in Sonar and see the what looks like steps?



    That's SONAR taking the easy way out, and drawing lines between sample points. An actual D/A convertor uses fourier transforms to reproduce an analogue signal from those same data. More sophisticated audio editors use the same algorithms to draw a smooth waveform trace through the sample points, complete with inter-sample peaks.

    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #10
    Bub
    Max Output Level: -3.5 dBFS
    • Total Posts : 7196
    • Joined: 2010/10/25 10:22:13
    • Location: Sneaking up behind you!
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 12:27:57 (permalink)
    Thanks. :)

    "I pulled the head off Elvis, filled Fred up to his pelvis, yaba daba do, the King is gone, and so are you."
    #11
    gwp99
    Max Output Level: -80 dBFS
    • Total Posts : 507
    • Joined: 2005/02/12 12:42:46
    • Location: Canada
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 15:12:20 (permalink)
    jinga8


     Just curious, but why would you want to know this? I suppose the easiest way to figure it is to multiply the length of the selection (in seconds) by the sample rate (44,100 or 48,000 or 96,000 etc.), but you probably asked in order to avoid doing that... 

    Thanks for the replies. 

      I was investigating latencies of my audio and bounced-vst tracks and I was getting tired of doing the math! 

    post edited by gwp99 - 2011/09/08 15:16:39

      X1E-64bit, Windows 7 64-bit, Sonica Labs Hush QT- Intel Core 2 Quad Q6700 2.66G, 8GB  RAM, RME Fireface UFX (using Firewire), 3 eSata internal/many external hdd's    
    #12
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 15:21:56 (permalink)

    I was investigating latencies of my audio and bounced=vst tracks and I was getting tired of doing the math!



    The way I handle this is to have nudge values of 24, 12 and 1 samples set up. Then count your nudges to get source and re-recorded tracks aligned. Using 24 and 12 makes it easy to count fractions of milliseconds if preferred.


    EDIT: Obviously I'm working at 48kHz. For 44.1, you might want 22 and 11. 44/48 and 22/24 might make it easier to count whole milliseconds, but then you have to do a lot of 1-sample nudges.
    post edited by brundlefly - 2011/09/08 15:27:56

    SONAR Platinum x64, 2x MOTU 2408/PCIe-424  (24-bit, 48kHz)
    Win10, I7-6700K @ 4.0GHz, 24GB DDR4, 2TB HDD, 32GB SSD Cache, GeForce GTX 750Ti, 2x 24" 16:10 IPS Monitors
    #13
    gwp99
    Max Output Level: -80 dBFS
    • Total Posts : 507
    • Joined: 2005/02/12 12:42:46
    • Location: Canada
    • Status: offline
    Re:Number of Samples in a selection? 2011/09/08 15:25:39 (permalink)
    brundlefly
    ...nudge values of 24, 12 and 1 samples set up. Then count your nudges to get source and re-recorded tracks aligned. Using 24 and 12 makes it easy to count fractions of milliseconds if preferred. 

    great tip...thanks

      X1E-64bit, Windows 7 64-bit, Sonica Labs Hush QT- Intel Core 2 Quad Q6700 2.66G, 8GB  RAM, RME Fireface UFX (using Firewire), 3 eSata internal/many external hdd's    
    #14
    Jump to:
    © 2024 APG vNext Commercial Version 5.1