plan_waves#
- pulserver.ir.plan_waves()[source]#
Lay out the waves of the cache beside a sequence file in a playout’s waveform memory.
With
budget, the layout is computed for it here, asconvert()computes the one a cache carries; without one, it is the layout the cache carries. Every wave is held at once where that fits the budget’s memory on each gradient axis; otherwise each segment position that plays waves holds a ring ofslotsslots, and the n-th instance of a segment in the scan plays slotn % slots. With a load rate, the loading is checked on the playout’s timeline scaled by the headroom: the scan starts with its first instance’s waves loaded, and the waves of each later instance are loaded one instance after another, from once the instanceslots - 1before it has started, and have to be loaded before it starts.- Returns:
budget: the budget it is laid out for, asWaveBudgetfields;mode:"none","resident"or"streamed";samples,resident_samples,streamed_samples: per axis, what the mode holds, every wave at once, and the slots of every position;waves: per subsequence, the region of each wave, for a resident layout;slots: per segment, the ring of regions of each position, for a streamed layout;samplesis 0 where the position plays no wave;loading_checked,least_spare_us,tightest: whether the loading was checked; the least, over the instances after the first up to the first whose loading ends after it starts, of how long before its start its loading ends, on the scaled timeline, in µs; and the subsequence and execution-stream position of the instance it is found at.
A region holds
samplessamples on each axis it drives, fromoffsetin that axis’s memory, -1 on another, sampled at the centres of the raster intervals fromstart_us, in µs from the block’s start, assample_wave()samples them.- Return type:
dict of str to Any
- Raises:
ValueError – If the cache cannot be loaded, if neither layout fits, or if a segment instance cannot be loaded in time.