p5.js | sampleRate() Function
The sampleRate() function is an inbuilt function in p5.js library. This function is used to get the number of samples of loaded audio carried per second. The sample rate of audio measured by kHz or Hz, 1000Hz = 1kHz. This is not changeable and it depends on the operating system's sound card. The hig