You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will correctly display one output pin. I have observed that linking will not work unless NODE_ID matches Node and OutputAttribute.
However, additional outputs such as:
Perhaps I need to dig into graph.h to understand why there is the expectation that in order for Nodes to link to each other the NODE_ID needs to match the Output attribute ID.
Many thanks
-Anthony
The text was updated successfully, but these errors were encountered:
UPDATE: I SOLVED IT (but it wasn't easy and I still don't know exactly why this works)
Since Links don't display for Values, I needed to create another value type node called a "Relay" whose sole is to allow me to call push() multiple times in a node.
I am able to create multiple outputs by calling process() on a Node in a circular way.
ADDITIONALLY
another edge needs to be created from the output to the node id. It is backwards from the inputs.
e.g.
else if (ImGui::IsKeyReleased((ImGuiKey)SDL_SCANCODE_M)) {
auto node = std::make_shared<MIDI>();
auto extra = std::make_shared<Relay>();
auto id = m_graph.insert_node(node);
auto extraId = m_graph.insert_node(extra);
m_graph.insert_edge(extraId, id);
node->params[MIDI::NODE_ID] = id;
node->params[MIDI::EXTRA_OUT_ID] = extraId;
m_nodes.push_back(node);
// outputs have to be inserted after the process node
const ImVec2 click_pos = ImGui::GetMousePosOnOpeningCurrentPopup();
ImNodes::SetNodeScreenSpacePos(id, click_pos);
}
MIDI::process()
{
// fill voices etc.
...
// N calls to process will return N voices
// this module should push N values to the stack
float val = m_voices[m_cycle];
m_cycle++;
if (m_cycle >= m_voices.size()) {
m_cycle = 0;
}
return m_voices[m_cycle];
}
Hi,
Are multiple outputs possible in apps based on the compute graph example?
I know that imnodes can certainly render multiple output pins, but it looks like if for example:
will correctly display one output pin. I have observed that linking will not work unless NODE_ID matches Node and OutputAttribute.
However, additional outputs such as:
make it impossible to link to another node.
Multiple inputs are quite easy to deal with.
Perhaps I need to dig into
graph.h
to understand why there is the expectation that in order for Nodes to link to each other the NODE_ID needs to match the Output attribute ID.Many thanks
-Anthony
The text was updated successfully, but these errors were encountered: