How do you change volume on Core2



  • Under "Speaker" in UIFLOW there is the ability to play wave files but the next step is to obviously change volume. Does anyone know how to change volume on a Core2 in UIFLOW or Python?



  • Hello, under hardware -> speaker -> there is a block called "setVolume" that you can use to change the volume of your Core device :)



  • Is there a C/C++ way to set volume?



  • On the Grey Core UIFLOW there is a volume command but on under the CORE2 Beta UIFLOW I cannot find one. Here is a screenshot. Let me know what you think. Thanks 0_1611854426492_image_2021-01-28_122026.png



  • @se Hi, This is core2 not grey, core2 doesn't support for now due to some bug we have to resolve that makes background noise. if you try normal core it will work just fine.

    @bobolink currently we don't support C/C++ API for it.



  • @zontex OK thanks for the reply. I guess you could set the volume of the .WAV files in the pc program “Audacity”.
    But user volume control would be nice.



  • @bobolink FYI to myself
    If you have an engineering background--part of Micropython--
    module 'dba: calculate dBA (A-weighting decibels) from an input stream of digital audio samples
    module 'i2stools': function to efficiently extract sample data from a buffer filled by I2S
    Signal processing (logical shifts--fractional multiply) on the PCM samples instead of hardware volume control gets the job done also.