Loading...
Searching...
No Matches
RenderedISFUtils.hpp
1#pragma once
2
3#include <Gfx/Graph/NodeRenderer.hpp>
4#include <Gfx/Graph/Utils.hpp>
5
6#include <ossia/audio/fft.hpp>
7#include <ossia/detail/small_flat_map.hpp>
8#include <ossia/detail/variant.hpp>
9#include <ossia/math/math_expression.hpp>
10
11namespace score::gfx
12{
14{
15 QRhiSampler* sampler{};
16 QRhiTexture* textures[2]{nullptr, nullptr};
17};
18using PassOutput = ossia::variant<PersistSampler, TextureRenderTarget>;
19
21{
22 explicit AudioTextureUpload();
23
24 void
25 process(AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
26
27 void processTemporal(
28 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
29
30 void processHistogram(
31 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
32
33 void processSpectral(
34 AudioTexture& audio, QRhiResourceUpdateBatch& res, QRhiTexture* rhiTexture);
35
36 [[nodiscard]] std::optional<Sampler> updateAudioTexture(
37 AudioTexture& audio, RenderList& renderer, char* materialData,
38 QRhiResourceUpdateBatch& res);
39
40private:
41 std::vector<float> m_scratchpad;
42 ossia::fft m_fft;
43};
44
45}
List of nodes to be rendered to an output.
Definition RenderList.hpp:30
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Data model for audio data being sent to the GPU.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:57
Definition RenderedISFUtils.hpp:21
Definition RenderedISFUtils.hpp:14