FrequencyToNoteNode::FrequencyToNoteNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mLastNote( -10000 ), mLastFreq( -10000 ) { FUGID( PIN_INPUT_RANGE, "4268393a-5c9e-4988-b1f1-6f0bca96bb59" ); FUGID( PIN_INPUT_FREQUENCY, "aefac5f4-db11-4445-bceb-611c89bc56a9" ); FUGID( PIN_OUTPUT_NOTE, "82d09108-d75d-4d89-bd2c-951454c1e1a8" ); FUGID( PIN_OUTPUT_BEND, "e07829e2-84ad-41a0-8ff7-b6eeb170098a" ); mPinInputFrequency = pinInput( "Frequency (Hz)", PIN_INPUT_FREQUENCY ); mPinInputRange = pinInput( "Range (Cents)", PIN_INPUT_RANGE ); mValOutputNote = pinOutput<fugio::VariantInterface *>( "MIDI Note", mPinOutputNote, PID_INTEGER, PIN_OUTPUT_NOTE ); mValOutputBend = pinOutput<fugio::VariantInterface *>( "MIDI Pitch Bend", mPinOutputBend, PID_INTEGER, PIN_OUTPUT_BEND ); mPinInputFrequency->setValue( 440.0 ); mValOutputBend->setVariant( 8192 ); mPinInputRange->setValue( 100 ); mPinInputRange->setDescription( "The range of pitch bend in cents (100 cents = 1 semitone)" ); mPinOutputNote->setDescription( "The MIDI note value (0-127)" ); mPinOutputBend->setDescription( "The MIDI pitch bend value (0-16383)" ); }
/*----------------------------------------------------------------------------*/ void uartConfigPins(struct UartBase *interface, const struct UartBaseConfig *config) { /* Direction configuration is not needed for alternate function pins */ if (config->rx) { /* Configure UART RX pin */ const struct PinEntry * const pinEntry = pinFind(uartPins, config->rx, interface->channel); assert(pinEntry); const struct Pin pin = pinInit(config->rx); pinInput(pin); pinSetFunction(pin, pinEntry->value); } if (config->tx) { /* Configure UART TX pin */ const struct PinEntry * const pinEntry = pinFind(uartPins, config->tx, interface->channel); assert(pinEntry); const struct Pin pin = pinInit(config->tx); pinInput(pin); pinSetFunction(pin, pinEntry->value); } }
OutputRangeNode::OutputRangeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mPinCnt( 0 ), mPinIdx( -1 ) { mPinInput = pinInput( "Input" ); mPinNumber = pinInput( "Number" ); }
SmoothNode::SmoothNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mLastTime( std::numeric_limits<qint64>::max() ) { mPinInput = pinInput( "Number" ); mPinIncSpeed = pinInput( "Inc. Speed" ); mPinDecSpeed = pinInput( "Dec. Speed" ); mPinIncSpeed->setValue( 1.0 ); mPinDecSpeed->setValue( 1.0 ); mValOutput = pinOutput<fugio::VariantInterface *>( "Number", mPinOutput, PID_FLOAT ); mPinInput->setAutoRename( true ); mNode->pairPins( mPinInput, mPinOutput ); mPinInput->setDescription( tr( "The input Number that we will aim towards" ) ); mPinIncSpeed->setDescription( tr( "If input Number is higher than our current output Number, this is how much we will add per second" ) ); mPinDecSpeed->setDescription( tr( "If input Number is lower than our current output Number, this is how much we will subtract per second" ) ); mPinOutput->setDescription( tr( "The output Number" ) ); }
JoinSizeNode::JoinSizeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinWidth = pinInput( tr( "Width" ) ); mPinHeight = pinInput( tr( "Height" ) ); mSize = pinOutput<fugio::VariantInterface *>( tr( "Size" ), mPinSize, PID_SIZE ); }
JoinVector4Node::JoinVector4Node( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinX = pinInput( "X" ); mPinY = pinInput( "Y" ); mPinZ = pinInput( "Z" ); mPinW = pinInput( "W" ); mVector4 = pinOutput<fugio::VariantInterface *>( "Vector4", mPinVector4, PID_VECTOR4 ); }
XorNode::XorNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { static const QUuid PII_NUMBER1( "{c13a41c6-544b-46bb-a9f2-19dd156d236c}" ); static const QUuid PII_NUMBER2( "{608ac771-490b-4ae6-9c81-12b9af526d09}" ); pinInput( "Boolean", PII_NUMBER1 ); pinInput( "Boolean", PII_NUMBER2 ); mValOutput = pinOutput<fugio::VariantInterface *>( "Boolean", mPinOutput, PID_BOOL ); }
RateControlNode::RateControlNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mHaveInput( false ), mHaveTrigger( false ), mTimeInput( 0 ), mTimeTrigger( 0 ) { FUGID( PIN_INPUT_INPUT, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_OUTPUT_OUTPUT, "261cc653-d7fa-4c34-a08b-3603e8ae71d5" ); mPinInput = pinInput( "Input", PIN_INPUT_INPUT ); mPinTrigger = pinInput( "Trigger", PID_FUGIO_NODE_TRIGGER ); mPinOutput = pinOutput( "Output", PIN_OUTPUT_OUTPUT ); }
NorNode::NorNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PII_NUMBER1, "c13a41c6-544b-46bb-a9f2-19dd156d236c" ); FUGID( PII_NUMBER2, "608ac771-490b-4ae6-9c81-12b9af526d09" ); FUGID( PIN_OUTPUT_BOOL, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); pinInput( "Boolean", PII_NUMBER1 ); pinInput( "Boolean", PII_NUMBER2 ); mValOutput = pinOutput<fugio::VariantInterface *>( "Boolean", mPinOutput, PID_BOOL, PIN_OUTPUT_BOOL ); }
AndBitsNode::AndBitsNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_BITS1, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_INPUT_BITS2, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); FUGID( PIN_OUTPUT_BITS, "261cc653-d7fa-4c34-a08b-3603e8ae71d5" ); mPinInputBits1 = pinInput( "Bits", PIN_INPUT_BITS1 ); mPinInputBits2 = pinInput( "Bits", PIN_INPUT_BITS2 ); mValOutputBits = pinOutput<fugio::VariantInterface *>( "Bits", mPinOutputBits, PID_BITARRAY, PIN_OUTPUT_BITS ); }
JoinPointNode::JoinPointNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_X, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_INPUT_Y, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); FUGID( PIN_OUTPUT_POINT, "261cc653-d7fa-4c34-a08b-3603e8ae71d5" ); mPinInputX = pinInput( "X", PIN_INPUT_X ); mPinInputY = pinInput( "Y", PIN_INPUT_Y ); mValOutputPoint = pinOutput<fugio::VariantInterface *>( tr( "Point" ), mPinOutputPoint, PID_POINT, PIN_OUTPUT_POINT ); }
PlayheadControlNode::PlayheadControlNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mLastTime( 0 ) { FUGID( PIN_INPUT_PLAY, "4aedb550-ad09-4099-ae8d-c8d87f72b7a7" ); FUGID( PIN_INPUT_STOP, "28a9899a-7a8e-446a-bcc2-110c0e8f5eca" ); FUGID( PIN_INPUT_REWIND, "9e31a9e7-4c8a-4fac-96aa-36f9b0ebe2d0" ); mPinInputPlay = pinInput( "Play", PIN_INPUT_PLAY ); mPinInputStop = pinInput( "Stop", PIN_INPUT_STOP ); mPinInputRewind = pinInput( "Rewind", PIN_INPUT_REWIND ); }
FFGLNode::FFGLNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mInstanceId( 0 ) { FUGID( PIN_INPUT_RENDER, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); FUGID( PIN_OUTPUT_RENDER, "261cc653-d7fa-4c34-a08b-3603e8ae71d5" ); QUuid InputUuid( "{6618BE23-94BD-4706-817A-6AB4736924D9}" ); QUuid ParamUuid( "{973ADEB3-F633-4AFA-B67E-1153DB0069BB}" ); pinInput( "Trigger", PID_FUGIO_NODE_TRIGGER ); mPinInputRender = pinInput( "Render", PIN_INPUT_RENDER ); mValOutputRender = pinOutput<fugio::NodeRenderInterface *>( "Render", mPinOutputRender, PID_RENDER, PIN_OUTPUT_RENDER ); if( ( mLibrary = FreeframePlugin::findPluginInfo( mNode->controlUuid() ) ) ) { if( mLibrary->initialise() ) { if( mLibrary->maxInputFrames() > 1 ) { for( int i = 0 ; i < mLibrary->maxInputFrames() ; i++ ) { mInputs.append( pinInput( QString( "Texture %1" ).arg( i ), InputUuid ) ); InputUuid = QUuid::fromRfc4122( QCryptographicHash::hash( InputUuid.toRfc4122(), QCryptographicHash::Md5 ) ); } } else if( mLibrary->maxInputFrames() > 0 ) { mInputs.append( pinInput( "Texture", InputUuid ) ); } //------------------------------------------------------------------------- for( const FreeframeLibrary::ParamEntry &PrmEnt : mLibrary->params() ) { QSharedPointer<fugio::PinInterface> PrmPin = pinInput( PrmEnt.mName, ParamUuid ); PrmPin->setValue( PrmEnt.mDefault ); mParams << PrmPin; ParamUuid = QUuid::fromRfc4122( QCryptographicHash::hash( ParamUuid.toRfc4122(), QCryptographicHash::Md5 ) ); PrmPin->setUpdatable( false ); } } } }
LastUpdatedInputNode::LastUpdatedInputNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinInput = pinInput( "Input 1" ); mPinOutput = pinOutput( "Output", next_uuid() ); }
FontMetricsNode::FontMetricsNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_FONT, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_INPUT_TEXT, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); FUGID( PIN_OUTPUT_BOUNDS, "261cc653-d7fa-4c34-a08b-3603e8ae71d5" ); mPinInputFont = pinInput( "Font", PIN_INPUT_FONT ); mPinInputText = pinInput( "String", PIN_INPUT_TEXT ); mValOutputBounds = pinOutput<fugio::VariantInterface *>( "Bounds", mPinOutputBounds, PID_RECT, PIN_OUTPUT_BOUNDS ); mPinInputFont->setValue( QFont() ); mPinInputText->setValue( QString() ); }
PreviewNode::PreviewNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mDockWidget( 0 ), mDockArea( Qt::BottomDockWidgetArea ), mOutput( Q_NULLPTR ) { FUGID( PIN_INPUT_STATE, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_INPUT_RENDER, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); FUGID( PIN_OUTPUT_SIZE, "5c8f8f4e-58ce-4e47-9e1e-4168d17e1863" ); mPinInputState = pinInput( "State", PIN_INPUT_STATE ); mPinInputRender = pinInput( "Render", PIN_INPUT_RENDER ); mValOutputSize = pinOutput<fugio::VariantInterface *>( "Size", mPinOutputSize, PID_SIZE, PIN_OUTPUT_SIZE ); mPinInputState->setDescription( tr( "The OpenGL rendering state to apply" ) ); mPinInputRender->setDescription( tr( "The input 3D Geometry to render" ) ); }
SinDegreeNode::SinDegreeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinInput = pinInput( "Degrees" ); mValOutput = pinOutput<fugio::VariantInterface *>( "Sin", mPinOutput, PID_FLOAT ); }
TCPSendRawNode::TCPSendRawNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mWriteTime( 0 ) { mPinHost = pinInput( "Host" ); mPinPort = pinInput( "Port" ); mPinData = pinInput( "Data" ); mPinHost->registerPinInputType( PID_STRING ); mPinPort->registerPinInputType( PID_INTEGER ); mPinData->registerPinInputType( PID_BYTEARRAY ); mPinHost->setValue( "localhost" ); mPinPort->setValue( 7878 ); mStream.setDevice( &mSocket ); }
ChopNode::ChopNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_INDEX, "c6b773cb-791e-431e-a265-7ec3cdd6cc46" ); FUGID( PIN_INPUT_VALUE, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_OUTPUT_VALUE, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); mPinInputIndex = pinInput( tr( "Count" ), PIN_INPUT_INDEX ); mPinInput = pinInput( tr( "String" ), PIN_INPUT_VALUE ); mValOutput = pinOutput<fugio::VariantInterface *>( "String", mPinOutput, PID_STRING, PIN_OUTPUT_VALUE ); mPinInput->setAutoRename( true ); mNode->pairPins( mPinInput, mPinOutput ); }
AddNode::AddNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_IMAGE1, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_INPUT_IMAGE2, "ce8d578e-c5a4-422f-b3c4-a1bdf40facdb" ); FUGID( PIN_OUTPUT_IMAGE, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); mPinInputImage1 = pinInput( "Image1", PIN_INPUT_IMAGE1 ); mPinInputImage1->registerPinInputType( PID_IMAGE ); mPinInputImage2 = pinInput( "Image2", PIN_INPUT_IMAGE2 ); mPinInputImage2->registerPinInputType( PID_IMAGE ); mValOutputImage = pinOutput<fugio::VariantInterface *>( "Image", mPinOutputImage, PID_IMAGE, PIN_OUTPUT_IMAGE ); }
MagnitudeNode::MagnitudeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ), mMagnitude( 0 ), mSamplePosition( 0 ), mProducerInstance( nullptr ) { mPinAudio = pinInput( "Audio" ); mPinSampleCount = pinInput( "Samples" ); mPinSampleCount->setValue( 48000/25 ); mValOutput = pinOutput<fugio::VariantInterface *>( "Magnitude", mPinOutput, PID_FLOAT ); mPinAudio->setDescription( tr( "The source audio signal" ) ); mPinSampleCount->setDescription( tr( "The number of samples to count in each calculation" ) ); mPinOutput->setDescription( tr( "The largest magnitude of the audio signal" ) ); }
ImageNode::ImageNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinSize = pinInput( "Size" ); mPinSize->registerPinInputType( PID_SIZE ); mImage = pinOutput<fugio::ImageInterface *>( "Image", mPinImage, PID_IMAGE ); }
LocalTimeNode::LocalTimeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_OUTPUT_TIME, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); mPinInputTrigger = pinInput( tr( "Trigger" ), PID_FUGIO_NODE_TRIGGER ); mValOutputTime = pinOutput<fugio::VariantInterface*>( tr( "DateTime" ), mPinOutputTime, PID_DATETIME, PIN_OUTPUT_TIME ); }
GrabScreenNode::GrabScreenNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinTrigger = pinInput( "Trigger" ); mValOutput = pinOutput<fugio::ImageInterface *>( "Image", mPinOutput, PID_IMAGE ); mPinOutput->setDescription( tr( "The screenshot image" ) ); }
IntegerNode::IntegerNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { pinInput( "Trigger", PID_FUGIO_NODE_TRIGGER ); mValue = pinOutput<fugio::VariantInterface *>( "Number", mPinValue, PID_INTEGER ); mPinValue->setDescription( tr( "The output Number" ) ); }
AddNode::AddNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_NUMBER1, "c13a41c6-544b-46bb-a9f2-19dd156d236c" ); FUGID( PIN_NUMBER2, "608ac771-490b-4ae6-9c81-12b9af526d09" ); FUGID( PIN_OUTPUT_NUMBER, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); mPinInput = pinInput( "Input", PIN_NUMBER1 ); QSharedPointer<fugio::PinInterface> P2 = pinInput( "Input", PIN_NUMBER2 ); mValOutputArray = pinOutput<fugio::VariantInterface *>( "Output", mPinOutput, PID_VARIANT, PIN_OUTPUT_NUMBER ); mPinInput->setDescription( tr( "The first number to add together" ) ); P2->setDescription( tr( "The second number to add together" ) ); mPinOutput->setDescription( tr( "The sum of the input pins added together" ) ); }
PacketDecodeNode::PacketDecodeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_PACKETS, "9e154e12-bcd8-4ead-95b1-5a59833bcf4e" ); FUGID( PIN_OUTPUT_DATA, "1b5e9ce8-acb9-478d-b84b-9288ab3c42f5" ); mPinInputPackets = pinInput( "Packets", PIN_INPUT_PACKETS ); mValOutputData = pinOutput<fugio::VariantInterface *>( "Data", mPinOutputData, PID_BYTEARRAY, PIN_OUTPUT_DATA ); }
ListSizeNode::ListSizeNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( ID_LIST, "80889F86-A9BA-4E9A-9798-E27D1BFA0B7F" ); FUGID( ID_SIZE, "4D5C91B1-D0FB-4DA2-875E-54CE85B0ECF2" ); mPinInputList = pinInput( "List", ID_LIST ); mOutputSize = pinOutput<fugio::VariantInterface *>( "Size", mPinOutputSize, PID_INTEGER, ID_SIZE ); }
SerialDecoderNode::SerialDecoderNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { FUGID( PIN_INPUT_BITS, "7AC449C1-0CC8-4DEA-A404-BB439BDD976E" ); FUGID( PIN_OUTPUT_DATA, "7A49997F-F720-4EBA-81D3-347F00C55CB9" ); mPinInputBits = pinInput( "Bits", PIN_INPUT_BITS ); mValOutputData = pinOutput<fugio::VariantInterface *>( "Data", mPinOutputData, PID_BYTEARRAY, PIN_OUTPUT_DATA ); }
SplitPointNode::SplitPointNode( QSharedPointer<fugio::NodeInterface> pNode ) : NodeControlBase( pNode ) { mPinInput = pinInput( tr( "Point" ) ); mPinInput->registerPinInputType( PID_POINT ); mX = pinOutput<fugio::VariantInterface *>( tr( "X" ), mPinX, PID_FLOAT ); mY = pinOutput<fugio::VariantInterface *>( tr( "Y" ), mPinY, PID_FLOAT ); }