I am happy to announce the arrival of Minim 2.1.0 BETA.

This is a beta build of the next release, which contains the new UGen framework developed by myself and Anderson Mills through his project at Numediart. There are still a few loose ends to clean up, primarily documentation related, but we expect to have everything wrapped by the end of June. Until then, feel free to give this build a whirl and see how you like the new real-time synthesis capabilities made possible by the UGen framework.

At this time, all of the documentation is in the form of Javadocs, which are included with the download. I hope that you find the docs for the UGen framework clear enough to get started. If not, there are also quite a few new examples included in the download that demonstrate how to use many of the UGens and how to programmatically sequence sound.

To install this release, you will simply unzip the archive into a folder named libraries in your sketch folder. This folder may already exist if you’ve installed other libraries not included with the Processing download; create the folder if it doesn’t exist. By installing this release in your sketchbook’s libraries folder, you will make Processing use this release instead of the release included with Processing. All of your existing sketches should still work. If you find one that doesn’t, please create an Issue on Github.

Have fun!

Things have been quiet around here, but hands have not been idle.

Anderson Mills has been hard at work on features for the next release of Minim. His project at Numediart to build a Unit Generator framework for Minim has made fantastic progress. On Tuesday, we plan to merge these changes back into the main Minim repository and release a Beta build. As usual, documenting is the hardest part of the job and we wanted to give people the chance to work with the new music programming features while we chew through that.

Meanwhile, I’ve created an app for the iPhone with Heather Kelley and Amanda Williams that is currently part of an art show in Hong Kong called Technosexual Bodies. The app is called Body Heat and I will be posting more news about that soon, I hope.

Finally, as hinted at in my previous post, I started work on a C++ port of Minim. It’s only in the beginning stages and it’s only functional enough to be useful for the iPhone app, but you are welcome to have a look at the repository. I’m making no promises about when the port will be finished, only saying that it will be finished at some point. If you’d like contribute to the port, make a fork at Github and have at it!

Teaser

Amplitude Modulated Sine Wave

Sorry for the down-time. The index file for wordpress was hacked, ultimately resulting in the site being disabled by my host. I’m all upgraded now and cleaned out the malicious php scripts that had been generated.

Minim on Github

The project with Numediart has gotten off to a great start. I’m excited about the additional music programming capabilities that will result from that work. However, the beginning of the project has already brought a much needed improvement to Minim: a better way for people to contribute to the project. I’ve been developing Minim pretty much solo and working in an undisclosed Subversion repository. My intent had been to eventually make that repository publicly known, but I had not figured out a good way to review changes that people might make before committing them. Github was suggested to me as a good site for managing this sort of thing and we decided to try the process out by using Github for the Numediart project. My initial experience with it has been fantastic, so I plan to keep Minim there. Visit the project page to see what it’s all about:

http://github.com/ddf/Minim

If you would like to contribute to the development of Minim, all you need to do is create a Github account and click the Fork button on the Minim project page. This will create a branch of the project that you can push to. When you’ve fixed a bug that’s been bothering you, or create a new feature that you think is worthy of being included, you simply send me a pull request and I will be able to review your patch and accept it or not. Totally sweet, I say.

Building Minim

I develop Minim in Eclipse, so the repository is structured such that you can clone it into your Eclipse workspace and then import it as an already existing project. Here are the instructions for acquiring and building Minim, if you fork the project, you’d follow these same instructions but use the “Your Clone URL” from the fork you create. Keep in mind that Eclipse doesn’t support two projects with the same name in the same workspace.

What you will need:

  1. Eclipse
  2. Git

What you will do:

  1. From your workspace directory, clone the github Minim repo. On the command line that’d be this command:

    git clone git://github.com/ddf/Minim.git

    This should create a local git repo in a directory named Minim.
  2. Then go into Eclipse, right click in the Package Explorer and choose “Import…”
  3. Under “General” choose “Existing Projects into Workspace”
  4. Click “Next”
  5. With “Select Root Directory” selected, choose “Browse…” and browse to the the directory that git just created.
  6. Click “Finish”. You should now have a browsable and buildable project named “Minim” in your package explorer.
  7. Create the folder libraries/minim/library inside of you sketchbook folder.
  8. Export the packages ddf.minim, ddf.minim.analysis, ddf.minim.effects, and ddf.minim.signals, as a single jar file named minim.jar into the folder you just created.
  9. Export the package ddf.minim.javasound as a jar file named jsminim.jar to the same folder.
  10. Export the package ddf.minim.spi as a jar file named minim-spi.jar to the same folder.
  11. Copy all of the jar files in the lib directory of the project, except for core.jar, into the same directory you exported the first three jars into.
  12. Run Processing and sketches that use Minim will use the build you just made, instead of the build that Processing comes with.

I am happy to announce the release of Minim 2.0.2! Download and installation instructions are available on the project page. Here’s what’s fixed and new, which you will also find in the changelog.txt file included with the distribution:

Fixed Bugs:

  • filenames were being parsed incorrectly by createRecorder.
  • fixed audio processing routines for AudioPlayer and AudioSnippet so that they don’t spend cycles doing nothing while not in the “play” state.
  • fixed the zombie thread bug, which kept audio processing Threads from exiting when close() was called.
  • fixed out-of-memory problems that could occur when large files were played. this does come at the cost of slower seek times.
  • fixed the isEnabled(AudioEffect) function, which, uh, wasn’t working.
  • fixed the pan() function, which was returning the BALANCE control.

New Features:

  • added functions to FFT for doing forward transforms with an offset: forward(float[] samples, offset) and forward(AudioBuffer samples, offset)
  • added a freqToIndex(float freq) method to FFT for finding out the index of the spectrum band that contains the passed in frequency.
  • added a stop() method to AudioSample, so that playing samples can be immediately silenced.
  • added setPanNoGlide(float pan) to Controller, which will snap the panning setting of a sound to the provided value.
  • added setInputMixer(Mixer) and setOutputMixer(Mixer), which allow you to specify which Java Mixer object should be used when obtaining inputs (AudioInput) and outputs (AudioOuput, AudioPlayer, AudioSnippet, AudioSample).

I am close close close to releasing 2.0.2! Today I wrote a couple new examples to demonstrate a couple additional features that have been added and I made sure the javadocs all looked good. Then I got sidetracked by writing a song. Well, so it goes, one doesn’t say no to songwriting when inspiration strikes. So! I plan to do the release tomorrow. As mentioned, there won’t be a whole lot new in this release, but a number of nasty bugs have been fixed. A full run down of what’s been fixed and what’s new will be provided with the release.

Among all of the things that I have learned while working as a professional game dev, two very important things are 1) how to document and test bug fixes and 2) the importance of having a sane build process. I didn’t have a terribly good handle on either of these things when I first created Minim and as a result pushing out a release was a very painful process.

Bug Fixing

I’ve not always been good about keeping track of exactly which bugs I’ve fixed in a release, or which new features I’ve added. No longer! The past two days have seen verbose comments in my check-ins, which means I should be able to create a pretty exact changelog for the next release. Here’s my most recent check-in comment, to give you an idea of the kinds of things coming up:

FourierTransform:

	- added freqToIndex method for converting a frequency to an index (duh)

	- added getAverageCenterFrequency to get the center frequency of an average band from an index

	- added forward(float[], int) and forward(AudioBuffer,int) so an offset into the array of floats can be provided, in case a user has a large buffer they want to analyze only parts of.

JSMinim:

    - added setInputMixer(Mixer) so users can specify which Mixer to use when getting TargetDataLines

    - added setOutputMixer(Mixer) so users can specify which Mixer to use when getting SourceDataLines

Minim:

	- added getServiceProvider() so that you can get a handle on the implementation being used by Minim.

	- added createSample functions to get an AudioSample using a buffer(s) of floats.

MinimServiceProvider:

	- added getAudioSample(float[], AudioFormat, int) and getAudioSample(float[], float[], AudioFormat, int) interface functions for requesting AudioSamples with buffers instead of from files.

Build Process

Creating and uploading new JAR files is not the hard part of doing a release. No, the hard part is making sure all of my online examples are up-to-date and making sure the Manual reflects any additions or changes to the API. The biggest pain with the examples is that the directory structure that I use on the website does not match the local directory structure, so it’s not just an easy drag-and-drop. I have my examples set up as a subdirectory in my Processing sketch folder, but what actually gets uploaded to the website are the contents of the applet directory that is generated for each sketch when I export it. Man, I would love to know a way to tell Processing to export an applet to a location other than the sketch folder, because then I could export to a directory structure that is the same as what’s on the web.

In any event, that’s a pain, and I need to figure that out, but I also finally got around to creating a subversion repository for all of the example source files. This will at least make it easier for me to tell at a glace which sketches need to have applets re-exported and uploaded. Maybe I can even figure out how to create an automated process for this. But, one thing I had to do before I could commit all of the examples, was delete all of the applet directories. To do that, I googled around and found this totally helpful batch file:


FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q %%G

That particular code will delete all subdirectories that match the name “*.svn*” under the directory it is executed in. All I had to do was change the name to match to “applet”. It’s all really clearly explained in this forum post and worked liked a charm.

So, that’s at least one part of my build process that’s been sanitized (by which I mean: made sane)!

Welcome to October! I’ve taken this entire month off of work to catch up on several personal projects that have been languishing. Here’s what I hope to accomplish this month:

Minim

I haven’t released an update of Minim for an entire year! This is totally unacceptable! I will be spending the next few days fixing as many of the TODOs I’ve got lying around in the code base as I can and putting together a new release. This will be a bug fix release.

Today is the first day of a project initiated by Dr. J. Anderson Mills III, a good friend of mine who is working at Numediart in Mons, Belgium. This project aims to outfit Minim with easy-to-use and easy-to-extend audio generating classes. The current suite of classes in the ddf.minim.signals package will likely be replaced with whatever we come up with. I will be working closely with Anderson on the project, including traveling to Mons in the middle of the month to participate in a kickoff workshop. The project will culminate with a presentation at Numediart and a new release of Minim.

iPhone

I’ve got several ideas for iPhone apps that I hope to be able to at least start work on this month. I will endeavor to post about progress on those as I make it.

Top Secret Music Game

I’ll be working more on the music game I mentioned several months ago. I don’t know how much I’ll be able to say about this, but hopefully there will be some kind of announcement that can be made in a couple month’s time.

I’m working on a music app that involves using Midi to trigger audio. Yesterday I wound up in a situation where after adding a new Track to my Sequence, I wasn’t receiving any of the MidiEvents that I added to the track. The problem, it turns out, is that the default Java Sequencer appears to cache all of the Tracks in a Sequence when you initially set the Sequence on the Sequencer using the setSequence method. If you modify the Sequence itself, as opposed to modifying the contents of the Tracks in the Sequence, the Sequencer won’t know about it until you call setSequence again. Just thought I’d throw this little tidbit out there, in case someone else runs into the same problem. Here’s some code to illustrate my point:

// make a sequence
Sequence s = new Sequence(Sequence.PPQ, 4);
 
// make a track in the sequence
Track t = s.createTrack();
 
// add midi events to the track
// ...
 
// make a sequencer
Sequencer seq = MidiSystem.getSequencer();
seq.open();
seq.setSequence(s);
seq.start();
 
// at this point, we can modify the Track
// and the Sequencer will pick up those new notes
// but if we do this:
Track t2 = s.createTrack();
// and then add notes to this track
// the Sequencer will NOT play these notes
// because it doesn't know about the track we just created
// we have to SET THE SEQUENCE AGAIN!
seq.setSequence(s);
// now the sequencer will play the notes in the track we just created.

Tags: , ,

« Older entries § Newer entries »