Replies: 1 comment 2 replies
|
Hi @PiezaKake! Conditional Sound PlaybackSo first of all, you probably want to save the pink noise once it is loaded as an AsyncSubject so you don't repeat the loading with
Then you can wrap your sound playback logic in a
And then in the
White noiseRegarding the white noise, you can generate it with Bonsai
You can set the voltage range in Playback timeHmm, how do you want to control the playback time? For instance, do you want to select from a list of sound durations randomly, or do you want to stop playback on some dynamic trigger? Without access to the hardware, it is a bit tricky for me to figure out a workflow, but some things you can try are:
Example workflow attached: |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In my Workflow, every 10 sec a servo motor moves to a position sampled randomly out of distribution.
I want to add a second branch where at the start of each trial there is a 25% chance of playing back pink noise with the AnalogOutput node. The pink noise has been saved as a .bin and read with the MatrixReader. To implement the 25% probability, I sample from a CreateDiscreteUnifirm (0-3) and have set a Condition to be true only when the sampled number is 0. My question is how do I trigger the AnalogOutput every time the Condition is true, and ideally control the playback time too? If it's possible to generate the pink noise in Bonsai, I am open to that too. White noise should work too.
All reactions