Removing JSON/XML

When using active admin there doesn’t seem to be an easy way to format the output of the JSON and XML export options like you can with the CSV option.

A nice patch by David Collom allows us to customise what is displayed rather then just hiding it in CSS. The patch is as follows and i just placed it at the top of one of my admin/###.rb files

1
2
3
4
5
6
7
8
9
10
11
12
13
module ActiveAdmin
  module Views
    class PaginatedCollection
      def build_pagination_with_formats(options)
        div :id => "index_footer" do
          build_pagination
          div(page_entries_info(options).html_safe, :class => "pagination_information")
          build_download_format_links([:csv]) unless @download_links == false
        end
      end
    end
  end
end

To customise what is displayed simplay change the array passing into build_download_format_links()

1
2
build_download_format_links([:csv])
build_download_format_links([:csv, :json])

I always struggle to remember / find the group security policy for an S3 bucket to make all files available to the public.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "Version": "2008-10-17",
  "Statement": [
      {
          "Sid": "AllowPublicRead",
          "Effect": "Allow",
          "Principal": {
              "AWS": "*"
          },
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::BUCKET-NAME/*"
      }
  ]
}

The only thing that can be changed is the BUCKET-NAME, leave all other aspects of the policy the same.

As part of my continued learnings as a rails developer I had some free time during the week and looked into optimising heroku to make my rails apps far more efficient and effective. When i tested unicorn it showed itself to be a awesomely efficient application server giving you far more bang for your buck on heroku. Heres a quick guide of how I set up unicorn and some additional optimisations using s3 and cloudfront to serve my files that will now become my default set up to get the most out of my dynos.

Read on →

For any one who wishes to know what Music Technology at Edinburgh actually means? well this is what i created for my final year project, a literal creative fusion of music and technology! Enjoy!

Its been a little quiet on the blog front, but many things have been programmed and I just haven’t had the time to update this.

I just wanted to post a recent Kinect based development which is using the Kinect in a 3D environment

Check out the video below. Any questions or if you want the source just let me know

Today I finished the very first stages of my 4th year research project which was finding a way to take data from the Xbox Kinect and send it to Max/Msp. By using the Ventuz OSC C# wrapper i was able to pack all the X, Y, Z data for all the skeletal points into an OSC bundle and send that to Max where it was unpacked in the patch.

The data sent from the Kinect is the unchanged co-ordinate system of values in metres rangeing from -1 to 1.

That being said the data sent from Kinect to Max can be used by any device that is capable of reading OSC packets .The format of the OSC message is

/joint/skeleton_[1/2]/[joint] x, y, z

This is a simple implementation allows quick and easy access to the full power of the kinects skeletal tracking in windows for users of the offical SDK over OSC. I hope it can be of some use.

Download Location 1

MediaFire Mirror

Chaos music is a composition based on my research and programming of the functions documented in my previous post. The piece uses the output data from the chaotic functions to drive musical synthesis with the built in functions of CLM, more explanation about methodology can be found in the attached report.

Final Piece

Download Source and Report


Download

For my final year piece iv been researching chaotic functions and non-linear maps. Below is a selection of function iv ported into Lisp. Each function outputs a text file that can be imported into most graphing software (the corresponding pictures were all produced with MATLAB). I intend to implement these functions and use there output to drive a piece of music.

The Logistic Equation

1
2
3
4
5
6
7
8
9
10
11
12
(with-open-file (*standard-output* "logistic.txt" :direction :output
                                  :if-exists :supersede)
(let*  ((x 0.5)
 (r-env '(0 1 1000 4.0))
 (r 0.0))


   (loop for i below 1000 do
  (setf r (envelope-interp i r-env)
     x (* r (* x (- 1 x))))
  (format t "~D ~D~%" r x)
  )))

The Henon Map

Read on →

The final piece of a course in C and its uses in building Max/Msp objects was to design and code a quadraphonic (four tap) delay in C for use as a Max/Msp object. The delay takes an incoming mono signal and allows the user to set four delay times which correspond to the the four outputs.

Source code and Object Download

Built using Max/Msp SDK 5.1.6, tested on Windows 7 with Max/Msp 5.0.7

Building on Submission 1 this performance piece use the PS3 Dualshock 3 controller as its interface. It takes full advantage of the built in tilt sensors as well as pressure triggers, analogue sticks D-pad and buttons. Functionality is best achieved through the Motion In Joy driver and getting the data through Max’s hi object

The Final Performance

Raw Max Files and Report Download

Built using Max 5.0.7 and MotioninJoy 6