how do you store many waveforms in one array?

For general discussion related FlowStone
Post Reply
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

how do you store many waveforms in one array?

Post by djbrynte »

I need some help how to add for example 32 waveforms into 1 array? how do i make this?
Attachments
Array.png
Array.png (14.56 KiB) Viewed 8913 times
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

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

Post 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
Attachments
Write and read wave arrays.fsm
(7.21 KiB) Downloaded 875 times
djbrynte
Posts: 613
Joined: Mon Jun 22, 2009 10:51 am
Contact:

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

Post by djbrynte »

spogg is best thanks mate!
Post Reply