We are about to switch to a new forum software. Until then we have removed the registration on this forum.
What's the correct way to preload a lot of samples? Instead of just one file like shown in this video: 11.1: Loading and Playing - p5.js Sound Tutorial
Answers
not like this:
Look at array in the reference:
I know about arrays, but the issue is here
"key"+i =
const
variable for it then:const FOLDER = 'keys/'
.const
for it:const EXT = '.wav'
.const
. Let's call it:const INDEX_START = 53
.const INDEX_END = 77
.const INDEX_TOTAL = 1 + INDEX_END - INDEX_START
.const sounds = Array(INDEX_TOTAL)
.@GoToLoop that's amazing. Thanks for this detailed answer. In the for loop, what is the "let" doing?
https://Developer.Mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let