Threshold
Re: Threshold
Hi,
What you are trying to do can be achieve in multiple ways.
You could for example amplify your signal and use the crop box, or the spatial filter or use the dsp.
The joined example solution use the dsp box, as it feels more natural (to me at least).
Cheers !
What you are trying to do can be achieve in multiple ways.
You could for example amplify your signal and use the crop box, or the spatial filter or use the dsp.
The joined example solution use the dsp box, as it feels more natural (to me at least).
Cheers !
- Attachments
-
- forum_answer_threshold.xml
- (14.51 KiB) Downloaded 579 times
Re: Threshold
Dear tgaugry
Thanks a lot for your attention and reply
here i explain about my project more.
there is a spaceship scenario in openvibe. As you know in this scenario the output is beta power.
Now i want to do a project like this one.
if beta power be higher than my threshold (for example 0.2) the OSC controller send number 1 to
IP port 127.0.0.1 :3000 and if beta power lower than my threshold send 0
my another software when receive 1 run and when receive 0 stop.
my software works just with 0 and 1
could you please help me about this issues?
Thanks a lot for your attention and reply
here i explain about my project more.
there is a spaceship scenario in openvibe. As you know in this scenario the output is beta power.
Now i want to do a project like this one.
if beta power be higher than my threshold (for example 0.2) the OSC controller send number 1 to
IP port 127.0.0.1 :3000 and if beta power lower than my threshold send 0
my another software when receive 1 run and when receive 0 stop.
my software works just with 0 and 1
could you please help me about this issues?
Re: Threshold
Hi,
The "Beta power" boxes are just signal display. It does not modify the signal.
If you want to apply previous threshold to this scenario, you just have to insert the DSP box with more or less the same formula ( instead of ) between the Beta Power signal display and the Simple dsp.
Hope that helps !
The "Beta power" boxes are just signal display. It does not modify the signal.
If you want to apply previous threshold to this scenario, you just have to insert the DSP box with more or less the same formula (
Code: Select all
(x > 0.2) ? 1 : 0
Code: Select all
(x > 0) ? 1 : 0
Hope that helps !
Re: Threshold
Dear tgaugry
I don't want to modify the signal.
when i use this formula in DSP box, the output is a signal.
I want to send just a binary code. when the signal is higher than my threshold it should send 1 via OSC controller and if lower than my threshold it should send 0
just 1 or 0 no signal.
Thanks a lot
I don't want to modify the signal.
when i use this formula in DSP box, the output is a signal.
I want to send just a binary code. when the signal is higher than my threshold it should send 1 via OSC controller and if lower than my threshold it should send 0
just 1 or 0 no signal.
Thanks a lot
Re: Threshold
Hi,
From what I understand, it seems that you want to send an event on rising and falling edge with OSC (and not each sample like i assumed earlier).
To achieve that :
- Take the output from the box just before the Beta Power signal display box
- Connect it to a dsp with formula (x > 0.2) ? 1 : -1
- Connect the dsp output to a Sign change detector
- Connect it to an OSC Controller
That's it. The only thing left is to configure The OSC controller & the stimulation sent by the Sign change detector.
Tell me if that solves your problem.
From what I understand, it seems that you want to send an event on rising and falling edge with OSC (and not each sample like i assumed earlier).
To achieve that :
- Take the output from the box just before the Beta Power signal display box
- Connect it to a dsp with formula (x > 0.2) ? 1 : -1
- Connect the dsp output to a Sign change detector
- Connect it to an OSC Controller
That's it. The only thing left is to configure The OSC controller & the stimulation sent by the Sign change detector.
Tell me if that solves your problem.
Re: Threshold
Hi
thanks a lot for your reply
your suggestion done.
I receive something in my another software but it's not 1 or 0.
a screenshot of my work attached
I want to do something like this code with openvibe box.
with this Matlab code my software works well.
markerGo=uint8('1');
markerStop=uint8('0');
hudps = dsp.UDPSender('RemoteIPPort',3000); % Sets up UDP Sender port
if(BetaValue>Threshold)
hudps(markerGo);
else
hudps(markerStop);
end
release(hudps); %When you're done, release the udp port
thanks a lot for your reply
your suggestion done.
I receive something in my another software but it's not 1 or 0.
a screenshot of my work attached
I want to do something like this code with openvibe box.
with this Matlab code my software works well.
markerGo=uint8('1');
markerStop=uint8('0');
hudps = dsp.UDPSender('RemoteIPPort',3000); % Sets up UDP Sender port
if(BetaValue>Threshold)
hudps(markerGo);
else
hudps(markerStop);
end
release(hudps); %When you're done, release the udp port
- Attachments
-
- 2.jpg (137.84 KiB) Viewed 26190 times
Re: Threshold
Hi,
I see that you are missing a box DSP box; you have to add another dsp box after the original one (or merge the 2 expressions), not replace it.
Also, did you change the triggered stimulation in the sign change detector box ?
Stimulation code list is available at http://openvibe.inria.fr/stimulation-codes/.
You'll likely be interested in OVTK_StimulationId_Number_00 and OVTK_StimulationId_Number_01.
Cheers !
I see that you are missing a box DSP box; you have to add another dsp box after the original one (or merge the 2 expressions), not replace it.
Also, did you change the triggered stimulation in the sign change detector box ?
Stimulation code list is available at http://openvibe.inria.fr/stimulation-codes/.
You'll likely be interested in OVTK_StimulationId_Number_00 and OVTK_StimulationId_Number_01.
Cheers !
Re: Threshold
I changed some stimulation but couldn't find 1 or 0
if this box send 1 or 0 that was perfect.
maybe this box output is not uint8
if this box send 1 or 0 that was perfect.
maybe this box output is not uint8
- Attachments
-
- 3.jpg (103.11 KiB) Viewed 26188 times
Re: Threshold
OVTK_StimulationId_Number_00 and OVTK_StimulationId_Number_01 should give you values 0 and 1, respectively.
Could you give me the actual value you get using these stimulations ?
Could you give me the actual value you get using these stimulations ?
Re: Threshold
I can receive just a character.
I guss i can't receive 1 or 0 because the output of this box is not unit8
here i have just
Received
but with my Matlab code i have 1 Received or 0 Received
markerGo=uint8('1');
markerStop=uint8('0');
I guss i can't receive 1 or 0 because the output of this box is not unit8
here i have just
![Very Happy :D](./images/smilies/icon_biggrin.gif)
but with my Matlab code i have 1 Received or 0 Received
markerGo=uint8('1');
markerStop=uint8('0');
- Attachments
-
- 4.jpg (26.57 KiB) Viewed 26187 times
Re: Threshold
You are likely right, I also think this is due to types conversion.
You will have to check how you do the conversion on your application side.
You will have to check how you do the conversion on your application side.
Re: Threshold
Maybe i should make some changes in the sign change box codes