ArrayArrayArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2017-09-23T01:18:28+02:00 https://brainmodular.com/forums/app.php/feed/topic/5865 2017-09-23T01:18:28+02:00 2017-09-23T01:18:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37864#p37864 <![CDATA[Super Simple Beginners Question]]>
Question #2

MIDI Array Sizing:
I'm slicing and dicing and found that this was a slightly different method.

I am wondering....is the MIDI Out Size handled as a part of the SDK functions now?
I do see where the stream is clamped off like normal before the input size detection.

Interesting though, if this is the case....is there any way to get rid of the clamp as well?
I assume no that we still have the issue where they cannot co-exist....is this right?

CODE:

1.Read Input Size2.Loop Looking for Size to be Greater than 0. &#40;MIDI Message has Arrived!&#41;3.Enter Processing Loop and copy the MIDI Input to the MIDI Output4.Read the Value of the Fader5.Enter “For" Loop. Process on each of the MIDI Messages Received.6.Get the MIDI Message copied to the MIDI Output earlier and use to modify ‘code’7.Only make changes to MIDI Messages that are Note ON/OFF Messages8.MIDI Messages contain Data1 and Data2, Data2 in this case is velocity.9.Change the velocity equal to the fader value that was placed in  ‘velo’10.Set the MIDI Output with the ‘code’ that was just modified.// Processvoid MidiTransposeExampleExample&#58;&#58;onProcess &#40;&#41; &#123;    int sizeMidiIn = sdkGetEvtSize &#40;midiIn&#41;; //===============Get size of MIDI place in sizeMidiIn    sdkSetEvtSize &#40;midiOut, 0&#41;; //=============================Set MIDI Out stream to Off    if &#40;sizeMidiIn > 0&#41; //=====================================Only do if sizeMidiIn is active    &#123;        sdkCopyEvt &#40;midiIn, midiOut&#41;; //=====Copy MIDI Input to the MIDI Output   int velo = &#40;int&#41;sdkGetEvtData&#40;fdrVelo&#41;; //=======Read fader and place in ‘velo’    for &#40;int i = 0; i < sizeMidiIn; i++&#41;//==============Do this while the count is less        &#123;                                     //=========than ‘i’. &#40;i.e. Do for all incoming MIDI&#41;             UsineMidiCode code = sdkGetEvtArrayMidi &#40;midiOut, i&#41;; //======Get MIDI, put in code           if &#40;code.Msg ==  MIDI_NOTEON || code.Msg ==  MIDI_NOTEOFF&#41; //====Only for Note ON/OFF           &#123;                code.Data2 = velo; //=======set the Data2&#40;velocity&#41; code equal to the fader value                sdkSetEvtArrayMidi &#40;midiOut, i, code&#41;; //====== &#40;Send MIDI!&#41;           &#125;        &#125;    &#125;&#125;
-s

Statistics: Posted by sephult — 23 Sep 2017, 01:18


]]>
2017-09-22T12:57:56+02:00 2017-09-22T12:57:56+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37858#p37858 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by sephult — 22 Sep 2017, 12:57


]]>
2017-09-22T12:56:54+02:00 2017-09-22T12:56:54+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37857#p37857 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by oli_lab — 22 Sep 2017, 12:56


]]>
2017-09-21T16:33:51+02:00 2017-09-21T16:33:51+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37843#p37843 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by nay-seven — 21 Sep 2017, 16:33


]]>
2017-09-21T16:12:49+02:00 2017-09-21T16:12:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37842#p37842 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by sephult — 21 Sep 2017, 16:12


]]>
2017-09-21T14:30:21+02:00 2017-09-21T14:30:21+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37841#p37841 <![CDATA[Super Simple Beginners Question]]> my first module with Usine SDK" manual ?
you have the best place for this job ? what do you think ?

Statistics: Posted by nay-seven — 21 Sep 2017, 14:30


]]>
2017-09-21T14:23:19+02:00 2017-09-21T14:23:19+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37840#p37840 <![CDATA[Super Simple Beginners Question]]> welcome to the big rabbit hole ;)

Statistics: Posted by 23fx23 — 21 Sep 2017, 14:23


]]>
2017-09-21T13:13:22+02:00 2017-09-21T13:13:22+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37834#p37834 <![CDATA[Super Simple Beginners Question]]> I was not finding the # of parameters....but I just found it finally!
Funny how you write a message for some help, and then solve it.

Well regardless here is some beginner information for adding your first parameter to a module:
Here you will define the number of node parameters:

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetModuleInfo &#40;MasterInfo* pMasterInfo, ModuleInfo* pModuleInfo&#41;

CODE:

pModuleInfo->NumberOfParams     = 4;
When you add the additional Switch Case(s), you can then just modify the onGetParamInfo

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetParamInfo &#40;int ParamIndex, TParamInfo* pParamInfo&#41;
by adding your new Switch Case Declaration:

CODE:

    case 3&#58;        pParamInfo->ParamType = ptDataFader;        pParamInfo->Caption = "velo";        pParamInfo->IsInput = TRUE;        pParamInfo->IsOutput = FALSE;        pParamInfo->MinValue = 0.0f;        pParamInfo->MaxValue = 127.0f;        pParamInfo->DefaultValue = 85.0f;        pParamInfo->Symbol = "v";        pParamInfo->Format = "%.0f";        pParamInfo->IsStoredInPreset = TRUE;        pParamInfo->CallBackType = ctImmediate;        pParamInfo->EventPtr = &fdrVelo;        break;

CODE:

SOLVED
-s

Statistics: Posted by sephult — 21 Sep 2017, 13:13


]]>
2017-09-21T13:03:48+02:00 2017-09-21T13:03:48+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37833#p37833 <![CDATA[Super Simple Beginners Question]]>
So finally decided to dive in the SDK.

I am just looking now with some examples and trial and error...but mostly error.
I took the MIDI Transpose demonstration and was looking at how to start adding nodes/parameters.
I copied the following from case 2 of the

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetParamInfo &#40;int ParamIndex, TParamInfo* pParamInfo&#41;

CODE:

case 3&#58;pParamInfo->ParamType = ptDataFader;pParamInfo->Caption = "velo";pParamInfo->IsInput = TRUE;pParamInfo->IsOutput = FALSE;pParamInfo->MinValue = 0.0f;pParamInfo->MaxValue = 127.0f;pParamInfo->DefaultValue = 85.0f;pParamInfo->Symbol = "v";pParamInfo->Format = "%.0f";pParamInfo->IsStoredInPreset = TRUE;pParamInfo->CallBackType = ctImmediate;pParamInfo->EventPtr = &fdrVelo;break;
My assumption is I am declaring this node here. At first I rebuilt the solution and the node did not show up in my module.
I also went further to read in the value maybe thinking since I did not access it, for some reason it was not created. so OnProcess I put the following:

CODE:

int velo = &#40;int&#41;sdkGetEvtData&#40;fdrVelo&#41;;
Doing a quick reference to how the &fdrPitch is being done, I could not find much difference in how I added the &fdrVelo.

Am I doing something wrong, or missing something?
Like I said I literally just jumped back in on the SDK, it's been many years (since the first HH SDKs, that I even messed around with).

-s

Statistics: Posted by sephult — 21 Sep 2017, 13:03


]]>
BrainModular BrainModular Users Forum 2017-09-23T01:18:28+02:00 https://brainmodular.com/forums/app.php/feed/topic/5865 2017-09-23T01:18:28+02:00 2017-09-23T01:18:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37864#p37864 <![CDATA[Super Simple Beginners Question]]>
Question #2

MIDI Array Sizing:
I'm slicing and dicing and found that this was a slightly different method.

I am wondering....is the MIDI Out Size handled as a part of the SDK functions now?
I do see where the stream is clamped off like normal before the input size detection.

Interesting though, if this is the case....is there any way to get rid of the clamp as well?
I assume no that we still have the issue where they cannot co-exist....is this right?

CODE:

1.Read Input Size2.Loop Looking for Size to be Greater than 0. &#40;MIDI Message has Arrived!&#41;3.Enter Processing Loop and copy the MIDI Input to the MIDI Output4.Read the Value of the Fader5.Enter “For" Loop. Process on each of the MIDI Messages Received.6.Get the MIDI Message copied to the MIDI Output earlier and use to modify ‘code’7.Only make changes to MIDI Messages that are Note ON/OFF Messages8.MIDI Messages contain Data1 and Data2, Data2 in this case is velocity.9.Change the velocity equal to the fader value that was placed in  ‘velo’10.Set the MIDI Output with the ‘code’ that was just modified.// Processvoid MidiTransposeExampleExample&#58;&#58;onProcess &#40;&#41; &#123;    int sizeMidiIn = sdkGetEvtSize &#40;midiIn&#41;; //===============Get size of MIDI place in sizeMidiIn    sdkSetEvtSize &#40;midiOut, 0&#41;; //=============================Set MIDI Out stream to Off    if &#40;sizeMidiIn > 0&#41; //=====================================Only do if sizeMidiIn is active    &#123;        sdkCopyEvt &#40;midiIn, midiOut&#41;; //=====Copy MIDI Input to the MIDI Output   int velo = &#40;int&#41;sdkGetEvtData&#40;fdrVelo&#41;; //=======Read fader and place in ‘velo’    for &#40;int i = 0; i < sizeMidiIn; i++&#41;//==============Do this while the count is less        &#123;                                     //=========than ‘i’. &#40;i.e. Do for all incoming MIDI&#41;             UsineMidiCode code = sdkGetEvtArrayMidi &#40;midiOut, i&#41;; //======Get MIDI, put in code           if &#40;code.Msg ==  MIDI_NOTEON || code.Msg ==  MIDI_NOTEOFF&#41; //====Only for Note ON/OFF           &#123;                code.Data2 = velo; //=======set the Data2&#40;velocity&#41; code equal to the fader value                sdkSetEvtArrayMidi &#40;midiOut, i, code&#41;; //====== &#40;Send MIDI!&#41;           &#125;        &#125;    &#125;&#125;
-s

Statistics: Posted by sephult — 23 Sep 2017, 01:18


]]>
2017-09-22T12:57:56+02:00 2017-09-22T12:57:56+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37858#p37858 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by sephult — 22 Sep 2017, 12:57


]]>
2017-09-22T12:56:54+02:00 2017-09-22T12:56:54+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37857#p37857 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by oli_lab — 22 Sep 2017, 12:56


]]>
2017-09-21T16:33:51+02:00 2017-09-21T16:33:51+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37843#p37843 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by nay-seven — 21 Sep 2017, 16:33


]]>
2017-09-21T16:12:49+02:00 2017-09-21T16:12:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37842#p37842 <![CDATA[Super Simple Beginners Question]]> Statistics: Posted by sephult — 21 Sep 2017, 16:12


]]>
2017-09-21T14:30:21+02:00 2017-09-21T14:30:21+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37841#p37841 <![CDATA[Super Simple Beginners Question]]> my first module with Usine SDK" manual ?
you have the best place for this job ? what do you think ?

Statistics: Posted by nay-seven — 21 Sep 2017, 14:30


]]>
2017-09-21T14:23:19+02:00 2017-09-21T14:23:19+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37840#p37840 <![CDATA[Super Simple Beginners Question]]> welcome to the big rabbit hole ;)

Statistics: Posted by 23fx23 — 21 Sep 2017, 14:23


]]>
2017-09-21T13:13:22+02:00 2017-09-21T13:13:22+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37834#p37834 <![CDATA[Super Simple Beginners Question]]> I was not finding the # of parameters....but I just found it finally!
Funny how you write a message for some help, and then solve it.

Well regardless here is some beginner information for adding your first parameter to a module:
Here you will define the number of node parameters:

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetModuleInfo &#40;MasterInfo* pMasterInfo, ModuleInfo* pModuleInfo&#41;

CODE:

pModuleInfo->NumberOfParams     = 4;
When you add the additional Switch Case(s), you can then just modify the onGetParamInfo

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetParamInfo &#40;int ParamIndex, TParamInfo* pParamInfo&#41;
by adding your new Switch Case Declaration:

CODE:

    case 3&#58;        pParamInfo->ParamType = ptDataFader;        pParamInfo->Caption = "velo";        pParamInfo->IsInput = TRUE;        pParamInfo->IsOutput = FALSE;        pParamInfo->MinValue = 0.0f;        pParamInfo->MaxValue = 127.0f;        pParamInfo->DefaultValue = 85.0f;        pParamInfo->Symbol = "v";        pParamInfo->Format = "%.0f";        pParamInfo->IsStoredInPreset = TRUE;        pParamInfo->CallBackType = ctImmediate;        pParamInfo->EventPtr = &fdrVelo;        break;

CODE:

SOLVED
-s

Statistics: Posted by sephult — 21 Sep 2017, 13:13


]]>
2017-09-21T13:03:48+02:00 2017-09-21T13:03:48+02:00 https://brainmodular.com/forums/viewtopic.php?t=5865&p=37833#p37833 <![CDATA[Super Simple Beginners Question]]>
So finally decided to dive in the SDK.

I am just looking now with some examples and trial and error...but mostly error.
I took the MIDI Transpose demonstration and was looking at how to start adding nodes/parameters.
I copied the following from case 2 of the

CODE:

void MidiTransposeExampleExample&#58;&#58;onGetParamInfo &#40;int ParamIndex, TParamInfo* pParamInfo&#41;

CODE:

case 3&#58;pParamInfo->ParamType = ptDataFader;pParamInfo->Caption = "velo";pParamInfo->IsInput = TRUE;pParamInfo->IsOutput = FALSE;pParamInfo->MinValue = 0.0f;pParamInfo->MaxValue = 127.0f;pParamInfo->DefaultValue = 85.0f;pParamInfo->Symbol = "v";pParamInfo->Format = "%.0f";pParamInfo->IsStoredInPreset = TRUE;pParamInfo->CallBackType = ctImmediate;pParamInfo->EventPtr = &fdrVelo;break;
My assumption is I am declaring this node here. At first I rebuilt the solution and the node did not show up in my module.
I also went further to read in the value maybe thinking since I did not access it, for some reason it was not created. so OnProcess I put the following:

CODE:

int velo = &#40;int&#41;sdkGetEvtData&#40;fdrVelo&#41;;
Doing a quick reference to how the &fdrPitch is being done, I could not find much difference in how I added the &fdrVelo.

Am I doing something wrong, or missing something?
Like I said I literally just jumped back in on the SDK, it's been many years (since the first HH SDKs, that I even messed around with).

-s

Statistics: Posted by sephult — 21 Sep 2017, 13:03


]]>