Coder Social home page Coder Social logo

belaplatform / bela Goto Github PK

View Code? Open in Web Editor NEW
481.0 481.0 138.0 119.56 MB

Bela: core code, IDE and lots of fun!

License: Other

Makefile 0.22% C++ 4.31% Assembly 0.07% JavaScript 89.92% CSS 0.71% HTML 1.67% Shell 0.38% C 0.70% OpenEdge ABL 0.80% Python 0.14% SuperCollider 0.01% TypeScript 0.77% Csound Document 0.01% SCSS 0.29%

bela's People

Contributors

adanlbenito avatar andrewcapon avatar apmcpherson avatar berntisak avatar dathinaios avatar davemeckin avatar dhruvag2000 avatar disastrid avatar ebai101 avatar elgiano avatar flowdeeps avatar giuliomoro avatar hemretez avatar henrix avatar jarmitage avatar jpburstrom avatar juhakivekas avatar ketchupok avatar kr-ish avatar krighxz avatar lbdonovan avatar ldo-ableton avatar mlang avatar musicalentropy avatar pelinski avatar richsl avatar roberthjack avatar teo523 avatar thetechnobear avatar transmogrifox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bela's Issues

drag and drop not very well supported across browsers

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)

Missing samples, documentation, projects directory; possibly incomplete IDE

Have been using the IDE to play around with the example projects but things seem incomplete.

  1. Clicking on 'example docs' lead me to pages with Cannot GET /documentation/xxx.html messages.
  2. Downloading the entire projects directory gets me a rather bare folder of two more rather bare folders, 'basic' and 'exampleTempProject'.
  3. The sample-piezo-trigger tells me there is a sample.wav file somewhere but I can't seem to find it in Belaboot.

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.

IDE: on Windows 10 "Update Bela" 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".

  • the javascript console displays
not a valid update zip archive
  • nothing is displayed in the node console.log .
  • no file is created in ~/Bela/updates/

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

Typing in the "make parameters" text box behaves wierdly

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

make stop does not stop some programs

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

  • change SIGINT to SIGKILL for make stop. This is bad, as it will not call cleanup or the destructors, so, for instance you could lose data if logging to disk or leaving out unexporting GPIOs or other worse things

option 2 - better

  • the first time you click the stop button you call 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.5seconds

option 3 - best

  • same as 2 but with an automatic 0.5s delay between issuing 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.

IDE: how do I copy the console contents?

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

IDE run project on boot does not add command line options

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"

SIGXCPU when running a project with analogue disabled

@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.

scopeSendBufferTask and OSCReceiveTask cause mode switches even if the scope window is closed

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.

Pd: implement MIDI out

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()

scripts: list_available_projects shows all .git clutter

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

D-Box software

Total newbie, Trying to get the D-box started but have a few issues

  1. Page 37 of assembly guide, I downloaded the zip as described but when trying to update bela error "not a valid zip archive"
  2. Page 39 couldn't upload sound files error "can't open binary files"
  3. Ran the Run command anyway, made it halfway through then got the error "Could not open directory usersounds"

Ideas?

Pd: implement MIDI out

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()

Loud click on startup

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.

USB device not always recognized (hotplug issue)

see here
http://forum.bela.io/d/29-midi-interface/8

here
https://groups.google.com/forum/?fromgroups#!searchin/beagleboard/usb/beagleboard/8aalvyWwaig/MUXAPuMTSOYJ

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:

  • add button in the IDE for USB reset
  • add script for USB reset
  • add command-line option for the Bela script to perform USB reset when the program starts ( could be useful for headless operation ). Maybe combined with an added "restart program" functionality for the Bela button.

real fix is patching the kernel.

Spaces are not supported in file names or paths

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:

  • Makefile
  • scripts
  • IDE (which currently automatically translates spaces into underscores to overcome this issue)

Low priority, but if anyone volunteers ...

Implement deinterleaved buffers

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

Legibility issues in IDE

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.