Archive for the Category » Downloads «
Skeleton of a (very basic) step sequencer written in Processing. BPM and threading not implemented yet. Left-click to add/remove triggers, Right-click to start/stop loop.
Continue for code..
A basic sketch that shows how to use millis() for basic animation, in this case a fade-in of a rect(). millis() returns the current runtime of the sketch in milliseconds. Left-click for Fade-In, Right-click for Fade-Out. The transparency (alpha channel of fill/stoke) is calculated evenly across the duration, meaning you only have to change 1 variable (delaytime) for adjusting the speed and fade. I wrote this from scratch as a learning activity some time ago, should be helpful to newcomers.
..continue for code..
Nice, another excuse to use Processing again..
The primary goal of this project is to make it foolishly easy to create Android apps using the Processing API. Once you have Processing on your machine (and the Android developer tools), you can simply write a line of code, hit Run (Ctrl-R or Cmd-R), and have your sketch show up in the emulator as a working Android app. Select Run on Device (Ctrl-Shift-R or Cmd-Shift-R) to have it run on an Android device that you have plugged into your machine. That’s good stuff!
- Android – Processing.
- NookColor USB ADB – nookDevs – Install SDK and Patch Driver.
- Processing & Android: Mobile App Development Made (Very) Easy | blprnt.blg.
- Jeanine Meyer’s Processing lessons.
- 3D in Processing for Android « codeanticode.
- Android Adventures, part 3: hardware detection in Processing | AK Eric .
I went through alot of trouble figuring out this stupid little theme hack. I am using Cyanogenmod 7.0.3 on a Nook Color, so it uses a “MDPI” framework for its theme. Turns out there are close to 5 million threads on the subject and 99% of them are worthless. After 3 days of googling and trying random solutions, what you’re left with is 3 or 4 Posts that you have to combine and redact to even come close to figuring out what you need.
Here are several of the wrong “methods” that are described across all the android forums:
- Replacing the .PNG files in system/framework/framework-res.apk (you can open apk’s in 7zip btw)
- Replacing just the statusbar .PNG files in system/app/SystemUI.apk
- Modifying the (compiled) binary XML within SystemUI.apk/res/layout/
- completely mucking with /system/framework/services.jar
- etc.. and so on.
Turns out, you dont need to touch framework-res.apk or ANYTHING else, specially not services.jar. framework-res.apk only needs to be modified if you are working on a secondary or third party theme. Resources for the default theme all come from the SystemUI.apk. I modified all the status_bar*.png files and title_bar_shadow.9.png, but I believe you only need to edit status_bar_background.png, statusbar_background.9.png, and statusbar_background_9.png. I’m not in the mood to go back and double check, maybe later.
What you would think is simple though, isn’t quite. You would THINK that just updating the PNG files would be enough. It’s not. I tried it a million times while trying all those other bad ideas. After the PNG files are modified, you also need to edit the file, classes.dex, which is in the root of SystemUI.apk. Turns out, .dex is yet another format only native to the Android platform. You can decompile and recompile them using smali/baksmali. Once you have decompiled the .dex file, you’ll be left with a bunch of files. For transparency on the statusbar to work, we need to edit two entries in StatusBarService.smali. After the 2 entries are changed, we save the file then recompile classes.dex, update the SystemUI.apk, then put it on our android device. That’s it. So while it’s not as simple as just editing the PNG files and updating the SystemUI.apk archive, it’s still a hell of a lot simpler than all these forum posts lead on. Actual instructions below.
- Copy /system/app/SystemUI.apk to your sdcard and then to your computer where you can edit it
- Install 7-Zip if you do not already have it. 7-Zip can browse into .apk files and let you update them easily.
- Open SystemUI.apk in 7-Zip, do not extract it, just open it.
- Browse to the folder res/drawable-mdpi/, then find all the png files that start with “status_bar”. Drag them into a folder on your desktop.
- Open the PNG files in Paint.Net, Gimp, Photoshop, or whatever your favorite editor is capable of png transparency.
- Delete the background. It’s now transparent. If you want semi-transparency, do that instead.
- Select all of your modified PNG files and drag them back into same spot you got them from in the SystemUI.apk file
- Press Backspace a couple times in 7-Zip to go back up to the root folder in the .apk, you should see classes.dex sitting there.
- Drag classes.dex out to a folder
- Download smali and baksmali from here: http://code.google.com/p/smali/downloads/list, put them in the same dir you put classes.dex
- Open a CMD prompt and change to that directory
- Type the following (replace 1.2.6 with whatever version it was you dl’d):
- java -jar baksmali-1.2.6.jar -o classout/ classes.dex
- Back in the folder, go into the new classout directory that was created.
- Find the file named StatusBarService.smali, open it in a text editor.
- Search for .line 1393, the line just under it should read: const/4 v5, -0×3. If it does not, but instead reads const/4 v5, 0×1 or const/4 v5, 0×2, change it.
- Search for new-instance v0, Landroid/view/WindowManager$LayoutParams; a couple lines down you should see const/4 v5, 0×2. Change it to const/4 v5, -0×3 also.
- Save the file and exit.
- Go back to your CMD prompt and enter this command (this recompiles the .dex file with your changes):
- java -jar smali-1.2.6.jar classout -o classes.dex
- Add classes.dex back to where you got it from in SystemUI.apk.
- Take your updated SystemUI.apk file and place it on your SD card. If you took it out, put the SD card back in your Android device. (instead of using a SD card you could use something else to move the files around, like dropbox).
- Open up Terminal on your Android device, change to the directory you put the update SystemUI.apk file. ex: cd /sdcard/myupdate/
- Type the following commands:
- mount -o remount,rw /system/
- cp -f SystemUI.apk /system/app
- The above command probably just crashed Launcher. Press Force Close . Reboot your device.
- The “Force Close” on the Status Bar after you replaced SystemUI.apk may loop and prevent you from pressing “reboot”. You can do a hard reset, or just keep pressing force close and each time also try to press the “reboot” option (that you brought up from the power button). You’ll eventually get to it.
That’s it. You should now have a transparent status bar.
Here is a working SystemUI.apk for a stock encore/MDPI Cyanogenmod 7.0.3 install with all the changes to the .dex file and PNGs already done.
*Update 6/30/11* My first SystemUI.apk had transparent status bar, but somewhere along the line I had changed the clock’s font color to White. This would make it so you could not see the clock when an app running had a white window. I’ve changed the clock color now to a light-ish blue color that is closer to the stock CM7 clock color and is visible with any background. This involved decompiling/recompiling SystemUI.apk and making changes to some XML files, which I might post more information on later because it can be pretty confusing.
It should not be needed to be said, but I do not in any way take any responsibility if you brick your shit. Theres no reason this should brick anything, but always remember to backup your files. At the most if you mess up, you can just reinstall Cyanogenmod.
After making the update, make sure to turn off Wallpaper Hack. It’s under Settings->ADW Launcher->System Preferences->Wallpaper Hack – Not doing so will result in the transparency only working with Live Wallpapers and not others (thanks to blane in the comments for reminding me).
Don’t bother looking for a freeware XML Diff or compare tool. Just use Notepad++, you should already have it anyways. One of the plugins it comes with by default is Compare. Green rows show diffs (look for unbolded text to find values or attributes that don’t match), red rows show entirely different formatting and values (including added lines), blue rows show lines removed (left-right compare), white rows are identical. There’s also a NAV on the right hand side which also works as a diff overlay.
KidQuaalude @ EM411 has posted a new tool for exporting and importing pattern/song and instrument data from DS-10, DS-10+ .sav files.
This will only be of interest to those of you who have a DS, either ‘Korg DS10′ or ‘Korg DS10 plus’, a PC and a way of getting your DS10 save files to/from your carts.
Last night I quickly knocked-up a tool that allows you to both import and export songs from the 18 available slots in the save file and also import and export your 24 saved synth patches. This will allow DS10 users to share songs and patches more easily and also backup and restore songs/instruments.
There is one minor issue with song sharing tho…due to the changes between DS10 and DS10 plus, songs created in plus cannot be loaded in DS10. However songs created in DS10 may be loaded in DS10 plus. This incompatibility does not affect intstruments.
The program itself is pretty self-explanitory…and there is no documentation yet
Enjoy! (and note i’m not responsible for any data loss/damage that may occur from using this app )
I’ve put together a collection of some PyBuzz scripts I have created over the past few years (most from 2005-2006). A few others are included as well by Dukajoe (PyDrum) and Kazuya. One or two the scripts might not work in the latest version of PyBuzz, but the code is still relevant so I’ve included everything in this zip I could put together.
PyBuzz is a native meta-controller of sorts written by Leonard Ritter for the modular audio application Jeskola Buzz. It the Buzz world, these control signal-type modules and their data are commonly referred to as Peer Controllers or Control Machines. PyBuzz is basically an empty shell of a machine that gives a Python scripter access to the Peer interface, making it possible to integrate custom Python scripts in order to control, react, or automate other machines within a Buzz project.
Below is an example of one of the more complete and useful scripts in the .Zip. It’s called master&servant and the principle is pretty simple. You assign Master and Slave targets then control it with the Master parameter slider. Anytime the value of Master goes above the Threshold, the Master parameter slider will begin to also control the Slave target.
Found this on my harddrive recently from an old project, example provided to me by Ed some time ago… Better posted here than lost or squandered. To explain, it’s a relatively simple python script that you can run against your Buzz gear directories and a list of all machines in the directory is given and the type of machine, what flags it uses, the author, etc. is returned. It is more or less a starting example, but you may find it useful for sorting modules as-is: