Nicee it works. Thank youuuu
Reading analog inputs in PureData
great
Heyy,
Im connecting all the electronics with bela and pure data and i run out of CPU. Is there a way we can use external CPU to run the code or i don't have another option but make a smaller project?
try setting the "User command line arguments" box in project settings to --board Batch --codec-mode=s=1,p=95,t=1
. Then run the program. It won't actually run, but it will print the actual CPU usage to the console. Knowing that, we can look into how to optimise things. (to revert to actually running the program, make sure you remove the content of the box)
- Edited
ok ill try
So this is the console print
And i also have this error i dont know what they mean.
The "freeverb~" is something i installed in puredata so idk how to include them in bela
And this was the settings now. but even with higher block size it wouldnt work.
actually i forgot to had the trill sensor of the player 2 of this game. now that i did this is the output.
you can get freeverb here, following instructions: https://github.com/BelaPlatform/Bela/issues/621
96% means that you are currently using 96% of the CPU for running audio processing, though in practice it's about 15% more than that because there's some overhead in getting audio in and out. It wouldn't be impossible to try to optimise things from this point until it can run in real-time: you are not very far off. Note however, that each freeverb channel you'd add would probably add 20% or so.
Those listbox
errors are probably due to the old Pd version that's on Bela. I have a new one if you want to try it out which should support it - unless it requires an external.
Can you share the whole patch?
Regarding the second sensor, check with i2detect -y -r 1
what Tril devices you have connected.
As context, I'm basically turning the game "Guess Who?" into a drum machine. So theres 2 players.
Theres more explanation on how to play the game on this github page : https://github.com/ArianaMarta/music-game/blob/main/README.md
Right now this is all the patches i have:
And this one is a simulation of the algorithm of the game without the eltronics (meaning that i use Toggles and Slidders to simulate buttons and potentiometers)
I was also suggested to try using bela just for the eletronics and use my computer for the audio processing via MIDI(https://learn.bela.io/tutorials/pure-data/communication/midi-send-and-receive/) or OSC (https://learn.bela.io/tutorials/pure-data/communication/open-sound-control/)
I was also wondering if i should just take the freeverb~ out or optimize the audio somehow.
Hope to hear from you,
Thank you
Where do i write this "i2detect -y -r 1" ?
in the console at the bottom of the IDE
Hello,
I manage to reduce to 85% CPU. Its still not enough.
This is the sounds i have at the moment. Do you have any recommendations how can i made them less CPU heavy?
also i still have that error. Do you think will be a problem for the program to run? or can i ignore?
If you update your core code to the latest dev branch , you will get Pd 0.55 which should run with about 75% CPU here, also thanks to some improvements I made to the Pd core for you.
Instructions to update are here: https://learn.bela.io/using-bela/bela-techniques/updating-bela/#updating-to-an-experimental-release
Unfortunately, I still see periodic dropouts when running at 64 samples per block. You can maybe downsample slightly: edit ~/Bela/core/I2c_Codec.cpp
and replace 44100
with something lower, such as e.g.: 40000
.
Regarding the Trill I2C error, can you show the output of i2cdetect -y -r 1
? It may well be that it gets fixed by the above update, so try that first.
Hello,
Thank you for your reply. I manage to simplify my audio quite a lot so i think ive improved the CPU issues. But regardless i would love to update the core code.
So i have to choose the "dev" branch and then download and follow the steps. Is that the branch you meant ("dev")?
Also, where and how do i edit the I2c_Codec.cpp file. I guess this is the file from the dev branch:
Does that mean that after downloading this branch i first change the file and then i update the board? Or is it something we can do after ?
thank youuuu
Ari Does that mean that after downloading this branch i first change the file and then i update the board
The former is more flexible so you can change it repeatedly without a full update
this is what i have when i type "i2cdetect -y -r 1"
what does it mean? how can i fix that error?