How to calculate sample length and PCM size
First convert the musical length into seconds. Multiplying seconds by sample rate gives the samples in each channel. For uncompressed PCM size, multiply by channel count and bytes per sample.
samples per channel = duration in seconds × sample rate