Thursday, 28 June 2012

Rack Planner Update 1.09

This is starting to come togethr really nicely now. The hardest part of today's coding was freeing each module from the confines of the rack it was originally dropped into (you select a rack then click 'Add Module' and the module drops into the top of the selected rack). But hey, it's done, and it works, and I'm pleased! You can now drag a module from one rack to another. Once dropped into place it sticks with that rack while you move it around in relation to other racks. The patch cables stay hooked-up as you drag things around too.

As mentioned earlier, you can zoom out...

And right in...

Rack Planner Update

Last night I got multiple rack save/load working along with zoom in/out (mouse wheel) and pan (click and drag a non-rack-occupied area to scroll the whole plan up/down/left/right). I also had an initial tinker with representing patch cables, getting them to move nicely as the racks are rearranged.

Tuesday, 26 June 2012

Rack Planner Update 1.08

One line of description, many many more lines of code!

"Multiple independent, movable racks"

Euro-only so far, but working a treat. Clicking and dragging either a rack's border or an empty part of the rack will allow you to move it around. Modules are currently confined to the racks they sit in (no dragging between racks), but this is on the to-do list.

The picture below represents a Doepfer 9U LC9 case, a Doepfer 6U LC6, a Doepfer 32hp 'Beauty Case' and a 3U 168hp 'skiff'.

Monday, 25 June 2012

Rack Planner Update 1.07

Today was hard work. A near-total rewrite. A more object-oriented approach was needed so better classes were designed to describe racks, modules and their relationships to eachother. The big win is that as well as being able to have multiple racks in a single plan, multiple format racks will be able to co-exist in the same plan too! You'll be able to have, for example, a Buchla rack next to your Euro setup. A Serge with your dotcom etc. etc. I feel that this work really sets the project up nicely for the future plans I have for it.

The screen below shows just a single rack sitting in the new interface. Tomorrow (or soon after) I hope to show two racks sharing the space.

Sunday, 24 June 2012

Rack Planner Update

Today's main addition was 'Smart Drop'. Dropping a module on a position occupied totally or partly by another module now not only gives the red warning rectangle, but also moves the module once it's actually dropped. If the nerest space big enough to accommodate the module without an overlap is to the right of the existing module then the dropped module is moved there. If there is a nearer space for it to the left then it is moved there. If there is no space big enough on the row in question then the module reverts to the original position it was dragged from.

In the screenshot below you can see a Z3000 being dropped to the right of, but overlapping, a PEG:

As there is available space to the right of the PEG and the module is neearer to that side then the result is shown below, with the Z3000 being automatically shifted 5 HP to the right:

This new function (particularly in combination with 'HP Rulers') allows for new rack layouts to be put together very quickly as modules can be roughly dropped where they need to be rather than having to be carefully aligned.

Tomorrow, if I get chance, I would like to work on multiple module selection, deselection and movement.

Saturday, 23 June 2012

Rack Planner Update

Today I created a splash screen (above) for the app and the mechanism to display it. The picture will change when I have time to render something more appropriate.

Also new today is 'FreeDrop' mode where modules can be placed anywhere on the virtual rack - even on top of eachother. This makes rearranging a full rack possible (and is the default mode on the other two commonly used rack planners). In this mode the 'DropZone' box is white rather than red or green (see image below), indicating that the module can be dropped wherever you want. Anywhere where two or more modules overlap is highlighted in orange so that these mistakes can be easily seen and fixed.

Oh and I fixed a bug that reported the available HP incorrectly (see yesterday's second screenshot).

Thursday, 21 June 2012

Rack Planner Update

Once again, not a massive amount to see that's new on the interface, but the code has grown from 300 to 600 lines today. It's alot more robust now. New functions for today:
  • Save - the output is called rack.xml. It conforms to the expected structure so loads successfully into dougcl's planner
  • Load - re-reads in the rack.xml file. I haven't tried loading in a dougcl-planner-created file yet, but it should work.
  • Delete module - richt-clicking on a module now deletes it
  • 3 new code functions to better manange the rack array.
  • Debug mode on/off
 Here's a picture of it loaded with what's in one of my LC9 cases:

Rack Planner Update

Lots of code that doesn't seem to have much of a visual impact today, but that keeps the modules confined in the racks correctly. One new feature worth mentioning are the 'HP Rulers' that appear as you drag modules around. These indicate the space available either side of the module and allow for easy positioning without having to count the dots/keyboard taps (see image above where an Echophon is being positioned 8HP from the right side of the case).

Tuesday, 19 June 2012

RichyHo's Rack Planner

We all love our rack planner of choice don't we? Well I'm going to use that love to craft my own. I'm using Processing to code it and basing it heavily on dougcl's Rack Planner (I spoke to him today to make sure I've got his blessing, and I have :-). This is my "let's learn Processing" project and in the last 24 hours it's taught me so much, including how to....
  • Unzip files (that's the module zips)
  • Read text files (the module.xml files)
  • String manipulation
  • Mouse handling
  • Image scaling
  • Snap to a grid
  • Handle fonts
  • Manage arrays
It uses the existing module zip files as so much effort has already gone into creating these it would be crazy to reinvent this particular wheel. The feature list so far (with a LONG way to go) is....
  • Browse a 'modules' subfolder to pick a module to add
  • Preview the module's "drop zone" (see green in image above)
  • Check it's not being dropped on top of another module (override will be available)
  • Pick up and move a module to a new unoccupied location
  • Define a rack structure (width, rows, columns, scaling)
  • Track HP usage
Next steps...
  • Delete module
  • Save & load standard Rack Planner files
I want to bring together the best bits from dougcl's Rack Planner, the online Modular Planner and also the Eurorack Database and add many new features of my own. I love it when a new project gets a grip on me!

Comments, ideas and any other feedback would be welcomed.

Saturday, 2 June 2012

Arduino, Processing & The Modular (Part 5)

A code update on the Arduino side sees not just CV values being sent to the serial (USB) port but also the values from the randomness knob so that these can be displayed on the Processing app's screen. These values are prefixed with an 'R' before sending so that they can be detected and treated differently when they are received. Turning the randomness kob now changes a value and moves a green bar on the app as shown below:

Ultimately all control values will be sent when they change (and also upon receipt of an "I'm starting" message sent the other way down the wire by the app to the Arduino. That way initial values will show when the app starts rather than having to wait for a knob to be turned for them to be updated to the current true values.

Friday, 1 June 2012

Arduino, Processing & The Modular (Part 4)

Today's arduino code changes include adding support for the left hand pot. This now sets the amount of randomness. Fully CCW = none (steady CV out). Fully CW = totally random. The Right green LED now indicates when double-clocking (2x tempo) randomly occurs. The picture below shows the output resulting from this knob being turned from zero to full over the course of the screen sweep.

Processing code changes include a test to represent the incoming data with a circular rather than linear sweep. It's not particularly inspiring and was only tried in the spirit of "let's see what happens"