belaplatform / bela Goto Github PK
View Code? Open in Web Editor NEWBela: core code, IDE and lots of fun!
License: Other
Bela: core code, IDE and lots of fun!
License: Other
e.g. if there are troubles with the I2C_MPR121 or if you have getchar() or if you have an infinite loop in the render function.
While the user code SHOULD appropriately handle the SIGINT that is sent by make stop
, we cannot foresee what the user will do and so we need to provide them with a way to stop ANY non-responding application.
option 1 - easy
option 2 - better
make stop
, then if you press it again without having pressed "run" in between, then it calls make kill
instead ( to be implemented), either manually or after e.g. 0.5secondsoption 3 - best
make stop
and an automatic call to make kill
in case the make runide process has not yet returned.option 4 - hmmm maybe actual best?
option 2 and 3 have the issue that calling make kill
after make stop
may be difficult: SIGINT may actually kill the audio thread that we are using to determine the PID ( see the Makefile line below)
PID=`grep $(BELA_AUDIO_THREAD_NAME) /proc/xenomai/stat | cut -d " " -f 5 | sed s/\s//g`; if [ -z $$PID ]; then [ $(QUIET) = true ] || echo "No process to kill"; else [ $(QUIET) = true ] || echo "Killing old Bela process $$PID"; kill -2 $$PID; fi; screen -X -S $(SCREEN_NAME) quit > /dev/null; exit 0;
So if the bela-audio thread dies , then running the same line again(but with kill -9
) will not work because PID is going to be empty.
Resolution: I will do the following: make stop
will sleep for 0.2 seconds after sending SIGINT (all well-behaving threads should quit after 0.1s anyhow) and then send SIGKILL to the same PID.
if possible it should be fixed, if it is not, then a traditional html4 upload button should be provided as a fallback ( current upload file button is reported not working on those same browsers where the drag and drop does not work)
NOT working in Chrome, Firefox, Edge, Internet Explorer on Windows 10.
Symptoms: when clicking "updateBela" and selecting a file, after clicking "update", the console immediately returns a message "not a valid zip archive".
not a valid update zip archive
NOTE: the regular drag-drop files in the browser window to add files to the project works just fine (even for large files).
Is there a way to make the "update bela" upload behave like one of the drag/drop uploads?
Raised here http://forum.bela.io/d/52-updating-bela
Not sure if this is related with this (don't think so)
https://productforums.google.com/forum/#!msg/chrome/H-BhgSbCx-E/MIkFe2V2CgAJ
They are currently passed to "belaProcess" instead.
Maybe passing them to both is a good idea as well (not that I can foresee why you would want to pass anything to make runide, but it should not harm)
This is a problem if you have an auxiliary task running in secondary mode doing something intensive
It should be a matter of adding more hooks similar to:
libpd_set_noteonhook(pdnoteon);
and replace the content of pdnoteon()
so that it writes to a queue that, when processed, actually calls midi.write()
It should instead read the settings.json file in the specified project (even if it is not the currently active one), generate a string CL_OPTIONS of command line options and invoke
make PROJECT=projectname startup CL="CL_OPTIONS"
Otherwise someone (I) may think that pressing "stop" will stop the update ...
Open two tabs. In one open an example project and make some edits. Then in the other, open another example project. This causes the edits made in the first tab to be overwritten without warning.
There should be a warning.
Maybe make it optional?
This way if you drag and drop a _main.pd
the running program will reload it.
Have been using the IDE to play around with the example projects but things seem incomplete.
Should I be cloning the repo to use Bela?
On the plus side, I was successful in making it go beep via the sinetone example so that was cool.
Commands that need a yes/no response do not respond correctly on the IDE terminal. For example:
i2cdetect -r 1
This will abort for not receiving an expect Y/n response.
Apologies if this is the wrong place to bring this up.
The current text on the IDE is rather hard to read - I saw that you have themes for it but unsure where options are to change to a darker layout or if it possible to apply my own theme.
Tried mapping the CSS locally but your cache break query parameter makes this impossible in the Chrome debugger.
E.g.: sending a trigger to last scope channel + 1 (so we need to add one more dac~ )
so that you can type
context->readAudio(
and see the argument list pop up.
I think this is what @apmcpherson requested, unless I got it wrong
Say I get a linker error: how do I copy it so I can paste it into google?
Select /copy does not work, because when selecting with click and drag, the line disappears as soon as you release the cursor
It should be a matter of adding more hooks similar to:
libpd_set_noteonhook(pdnoteon);
and replace the content of pdnoteon()
so that it actually calls midi.write()
... while right now it is only set to false
once at startup.
A user found a problem with the current state of things when trying to restart the audio engine.
http://forum.bela.io/d/48-stopping-and-starting/3
@apmcpherson Can you see any reason why it would a bad idea to set gShouldStop = false
in Bela_startAudio()
?
Total newbie, Trying to get the D-box started but have a few issues
Ideas?
Otherwise, if you scroll up to check past logs you are dragged at the bottom as soon as a new log is logged.
They never were in this repo nor in the soundsoftware repo.
@apmcpherson hopefully has them!
they should be placed into Bela/samples/
http://forum.bela.io/d/47-interleaving
BelaInitSettings.interleave
is currently ignored.
In the meantime, exit with error message when BelaInitSettings.interleave==0
Once it is implemented, the utilities should transparently handle interleaved and de-interleaved buffers. Not sure, though, how to do this without a) the performance penalty of having an if()
in a function that could potentially be called multiple times per sample and, b) compile-time flags, which make it difficult for make to check if a file is up-to-date
These mode switches are in the respective threads and NOT in the audio thread, so they are not critical, yet they should not be there (as they waste some resources).
Ideally once a thread that uses secondary-mode (kernel-mode) functions, it should stay in secondary mode without jumping back and forth between modes.
Note: using Bela_scheduleAuxiliaryTask
will surely cause a mode switch to primary mode.
Commands that need a yes/no response do not respond correctly on the IDE terminal. For example:
i2cdetect -r 1
This will abort for not receiving an expect Y/n response.
see here
http://forum.bela.io/d/29-midi-interface/8
and here
https://groups.google.com/forum/?fromgroups#!category-topic/beagleboard/beaglebone-black/nuyyVDhU6bw
and try this
echo on > /sys/devices/ocp.3/47400000.usb/power/control
If it works, hotfixes are:
real fix is patching the kernel.
currently it is only showing colum
Raised on the forum here: http://forum.bela.io/d/40-how-to-address-the-i-o-via-pd/11
as the debugger has gone, too ...
which makes it useless to use, e.g.:
printf("%4d", myint);
@LBDonovan said:
Run any simple project with analogue disabled (use flag -N0) and no audio is heard, the program crashes with SIGXCPU (CPU time limit exceeded). This is happening because the PRU's COMM_BUFFER_FRAMES value gets set to context.analogFrames in PRU.cpp, which is set to 0 when analogue is disabled. As a result the PRU can never break out of its write loop, and never reaches WRITE_LOOP_DONE. This causes the C++ program to hang until it is killed by Xenomai.
Overriding the setting of COMM_BUFFER_FRAMES in PRU.cpp and forcing it to the default value of 8 causes the audio to work for approximately 4 seconds, but the program still dies with SIGXCPU, so there must be another problem somewhere in the PRU code when analogue is disabled.
NOTE: below we are referring to commits on the old repo https://code.soundsoftware.ac.uk/projects/beaglert/repository
Issue first appears in commit 52
Commits 47-51 are not working for me at the moment (they use interrupts)
Commits up to 46 (inclusive) do not show this bug. Note that up to commit 46, numAudioFrames is erroneously set to 0 if the analog channels are disabled, so for instance in order to run commit 46 with matrix disabled you need to
-- select project basic
-- in render.cpp replace
for(int n = 0; n < numAudioFrames; n++) {
with
for(int n = 0; n < 16; n++) {
-- run with -m0
Also note that there is NO change in the PRU code between rev 46 and 52.
This should be noted on the wiki.
Solution is to edit render.cpp or clean project before running.
In the first paragraph of the IDE Wiki page, there is a reference to http://192.178.6.2/ - I think this is a transposition error and should read http://192.168.7.2/ as reflected in the screenshot directly below it.
This has been around since the beginning, but it would be nice to squelch it. When you start a program, there's a loud click at the audio outputs. It is related to the codec, not the speaker amps. I think it could be silenced through a different order and timing of I2C initialisation.
If you type something like
123
and you then you move your cursor back to after the 1 and type "45", you obtain
14235
this is because after key stroke the cursors jumps at the end, so after the '4', the cursor jumps at the end and therefore the '5' is appended to the string
That's typical. In the long run, we may want to support those, for ease of use.
There are three places where this is needed, in order of priority:
Low priority, but if anyone volunteers ...
e.g.
basic/.git/objects/info
basic/.git/branches
basic/.git/hooks
basic/.git/info
ExEIH
ex-e-i-h
ex-test
ex-test/.git
ex-test/.git/logs
ex-test/.git/logs/refs
ex-test/.git/logs/refs/heads
ex-test/.git/refs
ex-test/.git/refs/heads
ex-test/.git/refs/tags
ex-test/.git/objects
ex-test/.git/objects/dd
ex-test/.git/objects/b2
ex-test/.git/objects/82
ex-test/.git/objects/35
ex-test/.git/objects/pack
ex-test/.git/objects/06
ex-test/.git/objects/88
ex-test/.git/objects/1f
ex-test/.git/objects/info
ex-test/.git/branches
ex-test/.git/hooks
ex-test/.git/info
They give the error 'invalid operands to binary expression ('float' and 'float')'
It affects all the examples changed in this commit, including scope_analog.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.