Page 1 of 1

how do you store many waveforms in one array?

PostPosted: Wed Jan 30, 2019 9:25 am
by djbrynte
I need some help how to add for example 32 waveforms into 1 array? how do i make this?

Re: how do you store many waveforms in one array?

PostPosted: Wed Jan 30, 2019 10:31 am
by Spogg
Decide on the maximum number of wavs you want to store (64 in the picture above).

Attach a trigger button to the Resize input and trigger it. If you want to add more later on you can increase the number and hit trigger and the already stored wavs will not be deleted. The N input doesn’t need the integer afterwards.

The Index input then addresses the slot number you wish to write and store into. Note this is zero-based, so if you have set 32 slots, the index value runs from 0 to 31.

Connect a Wav source to the Wave input (usually from a loading system).

Trigger the Add pin.

Note that if the Mono input is True any loaded Wavs will be stored as mono, otherwise they will retain the original channel count.

The schematic will then hold the Wavs when saved. If you save the loaded prim into your toolbox it will retain the Wavs in the Prim’s code, so you could use it elsewhere in a different schematic. I should mention that this can only be done from the edit environment and not from a user’s GUI in a plugin.

Hope that helps!

Cheers

Spogg

Re: how do you store many waveforms in one array?

PostPosted: Wed Jan 30, 2019 4:41 pm
by djbrynte
spogg is best thanks mate!