How to install the "sound" library for Processing in a simple way? - audio

It's just so weird that Processing does't come with a "sound" library while the official information provides related information(https://processing.org/reference/libraries/sound/). This only leads me to the Github source code page(https://github.com/processing/processing-sound) and I literally do not know how to install this thing...
Yes, I could use the "Minim" or "Sonia" library. But I have a bunch of example programs which use the "sound" library, each with a "import processing.sound.*;" right at the beginning.
In addition, I can't find anything named "Sound" in the Processing library manager..
What's going on with this library? How do I install it easily?
update
I'm asking this because there is actually no option to install it:
Even when I search:

From your Processing PDE, go to the Sketch menu, then expand the Import Library submenu, and select the Add Library... option.
That will open up a dialog that lists libraries you can install, including the Sound library.
Install it, and you'll be able to use the classes in the processing.sound package.

You may download the .jar file of the library you need and put it in a folder named "code" in your sketch folder.

If you are using a Mac you can still add the library but it's a bit more complicated. You need to download the library and open the finder/documents/processing/libraries and drop the sound folder that you download from the web in the the libraries folder. You then open Processing and add the library through the library manager.

Related

Lesshat and Brunch

I'd like to make the popular LESS library LessHat available to my Brunch template but I want it done in a way that I can:
Take advantage of the Bower integration so I always have the latest
Rather than having the library transpiled to CSS I want the LESS to be made available to my own custom LESS files
Is this possible? A step too far? Obviously, it's not hard to put the static LESS file into my app/stylesheets directory but this makes the linking static and I don't get the Bower integration which would be pretty slick.
Just link to the lesshat-file in your less files. This way you can use lesshat-functions and still update lesshat with bower.
For example
#import 'bower_components/lesshat/build/lesshat-prefixed.less';
if you have styles.less in your project root folder.

How can I download source code from Linux Cross Reference library (generated by LXR engine)?

I wanted to download Linux kernel module source code from http://lxr.free-electrons.com/source/net/bluetooth/. Is there any tool like SVN to download the source code generated by LXR engine?
Thanks in advance!
If you're still looking for an answer, here is a procedure based on a low documented feature of LXR.
Display the file you are interested in
Modify the URL in the browser address bar, adding at the end ?_raw=1 and go there (i.e. press return key)
The file is then displayed "as is", without any decoration (it is sent as text/plain)
You can now save the file from browser menu command File->Save as
NOTES:
The ?_raw=1 argument can be used to have HTML files interpreted by your browser, i.e. displayed as HTML because they will be sent as text/html.
The feature has been present in LXR for ages, though in versions older than 0.10 the argument is spelled ?raw=1 (without underscore).
I checked that ?raw=1 works with free-electrons though they use 0.3.1 which was released in 2003!
The documentation on lxr states that there is a git repo.
http://lxr.linux.no/
I have never tried it, but it may be what you are looking for
Not exactly an answer, but I was looking for a related thing - the possibility to download individual C files from LXR as plain text. If it was possible to download files as text, in principle you could write some sort of a parser/automatic downloader for a whole directory.
The documentation for the LXR engine seems to be here:
LXR Cross Referencer - Browse /doc at SourceForge.net
... and as far as I could see from the 1.0 PDF manual (note that lxr.free-electrons.com seems to run on version 0.3.1, though), there is no mention of plain-text source files being exported (in addition) to the HTML.
So, very likely, as the plain-text source files seem not to be available in an LXR export, there will be no tool that will be able to download. (Btw, I too wish there was a tool like this, otherwise the only option is to clone the entire Linux source tree via git).
Note, however, that there is also an experimental version of LXR from lxr.linux.no ; that one generates HTML that requires JavaScript, and it will show a "download" button in its interface; then one can download the plain-text source file. As lxr.linux.no is down for me for the moment, here's a link to an annotated HTML page to another site, that seems to use the same engine (there is no note ATM for the LXR engine numeric version):
http://lxr.missinglinkelectronics.com/#linux+v2.6.38/sound/drivers/dummy.c
... and this is how the link looks like to obtain plain-text version:
http://lxr.missinglinkelectronics.com/linux+v2.6.38/+save=sound/drivers/dummy.c
Note that this is a different URL format than what lxr.free-electrons.com would use:
http://lxr.free-electrons.com/source/sound/drivers/dummy.c?v=2.6.38
... and there is a note on the start page ( http://lxr.missinglinkelectronics.com/ )
once you enable JavaScript, which states that:
lxr.missinglinkelectronics.com is currently running an experimental fork of the LXR software provided by lxr.linux.no.
... or, in other words: the link format for downloading plain-text source files from lxr.linux.no, will not work for the (current) lxr.free-electrons.com installation.
Here you can browse the references and also can download the source file
https://code-grep.com/view/project/54b083273b2082684a000008/linux-3.19-rc2
On free-electrons.com, it works by adding the argument "raw=1" in the URL. For example, this URL...
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8
... will become this :
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8&raw=1
The resulting page can then be saved using the "file saving" feature of your browser. On Linux and Windows, this is usually mapped to the ctrl+s keyboard shortcut.

Default c++ project which is setup using autoconf

I know this is not a programming question so someone might close this but I am struggling hard in setting up a simple c++11 project using autoconf. I want a src and obj directory for source and object files. I also want a recursive directory structure. Went through many links but facing a hard time on this. What I wana achieve is have a Project directory then a src and obj directory in that Project directory which will have sub directories for each components. Just thought of asking if there exists some default project which I can download and then use it for my purpose. Thanks.
You can't do that with automake. It doesn't let you choose where the object files go.
Instead you can configure and build in a parallel tree. That is what many GNU developers do. This way the sources and objects are separated.

Trying to add mapviewballoons library in project

I am trying to add mapviewballoons library in my project, by right click project > properties > Android > isLibrary but whenever i click on Add button, in Project Selection box i am not getting any option to add library, i have downloaded mapviewballoons library in my downloads folder
Hmm...I did it in few simple steps, If you have Git configured it will be easy just clone Git repository, right click->import project. If mapviewballoons project is not checked as library (checkbox in properties->android is Library) then check it and simply in project in which you want to use balloons properties->android->add library and it will appear in list
I dont have GIT, dont know what it is, nor have time to learn what that is.
Is there no easier way to import this stuff into a library project?
Why is Java always so ... hard!?
I dont want to spend days learning GIT, just to get those balloons!
My project is overtime already.

How can I override a class in J2ME Polish binaries?

I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included.
The problem cannot be solved by extending the class as it involves members with private access.
How should I go about fixing it? Should I simply compile the class in question with Javac or should try to locate build script in their repository?
There is no binary code for J2MEPolish UI library, because these classes are also preprocessed during your application compilation. This is why there is also no build script for J2MEPolish UI part - the resulting binary, if it compiles, would not make any sense :)
If you are using this UI class directly (there is no Polish magic involved) I would suggest to copy it into your own project, make the changes there and you should be just fine.
But there is a small issue. I'm not 100% sure, but Polish build process should be as follows: first your classes are preprocessed and then Polish classes will be preprocessed. If the UI component, that you copied into your project, will stay in the same java package, it could happen that your changes will be overwritten by buggy Polish implementation. You can check it by running the application or looking at the final java code in build directory.
If the overwriting problem happens, then you have two options - move UI class in your project into different package (I'm 99% sure this should be fine if you use it directly) or you need to modify Polish build process, so that it would preprocess Polish classes first and you could overwrite changes done by it.
/JaanusSiim
I know this question has been answered and accepted but an easier method would be to used their built in property (for any one coming here via the magic search engines)
polish.client.source=/projecthome/j2me-polish-source
which is simply a copy of their sources packaged with the installer. You can copy this into your own source tree and thus have version history of your changes.
While JaanusSiim's method might work I would not recommend it as it becomes confusing having de.enough.** packages in your own source tree I normally create a src for my personal source and a src-j2mepolish for their source files this was it is VERY explicit what I have added to the standard versions.

Resources