I hope this is not my legacy

blog thoughts software stuff
RSS
  • About
  • BeatButcherMPC
  • Design of an Audio Sampler
  • Find Me
  • food

BeatButcherMPC Update

by admin on November 16, 2009 at 8:20 pm

OK here goes. The confessional post which I have been dreading for the last 18 months is here. I have fended and fobbed off a lot of people in the last two years and I really need to apologise. For anyone who has come to this website by chance, the domain beatbutchermpc.com isn’t just random. In the summer of 2008 I started writing an application with the aim of making life for Akai MPC500 sampler/synthesizer users easier. I got a lot of great support from the community at mpc-forums.com and worked very very hard for about three weeks to release an alpha version of the program. I then went on holiday, moved back to university life, got a job and all sorts of other distractions which prevented me from putting much time into development. I did however make quite a lot of progress from the alpha release, including a massive code refactor (mainly in order to implement undo/redo functionality) and a brand new GUI.

I have kept promising that eventually the program will be released, and I really want to fulfil that promise, to myself and to all of the people who have shown me support. One of the main reasons why I have found it hard to put time into the project is the fact that I became very disheartened with Akai for constantly putting arbitrary restraints on the hardware and operating systems which considerably limit the device’s usability in a studio environment (I do think it is a great portable tool). Another reason was that I felt like I have learned an incredible amount about desktop application development in getting BeatButcherMPC to the state it is currently in, but there wasn’t much more that I could get out of it. I have decided that this outlook was a mistake, and something huge which I need to learn is how to finish a project and release it. So that is what I am going to do.

  Comment

Open source software and me

by admin on November 15, 2009 at 5:03 pm

I prefer to use open source software for several reasons. Firstly it is always nice, when a personal need for a new program arises, to find that quality tools are available free of charge. This is different, I understand, from the notion of freedom which the Free Software Foundation supports, but I mention it first because it is a really great notion. People are giving up their personal time to develop tools for anyone to use, for no monetary reward. They respond to bug reports and feature requests, many of which will never directly affect them, merely for the love of development and a sense of providing something useful to the community. Personally I find using open source software rewarding because no-one writes software for it to sit unused in a repository.

As a professional software developer I obviously support the notion of intellectual property, and believe that people should be paid for their work. However I also think that today we have amazing computing machines which are capable of unleashing so much from humans which has previously been impossible. This has either due to a lack of resources (for example, to typeset a book before Tex was an incredibly expensive and time-consuming process) or due to a knowledge barrier. The Internet, and the community contributed knowledge base it has inspired, has removed the barrier to entry for knowledge in most fields. An obvious example of this is Wikipedia, but even early BBS systems showed that people were willing to help each other solve problems even without ever exchanging names or seeing faces. Recently several prestigious universities such as Stanford have taken the admirable step of allowing open access to all lecture notes and course materials. The point that I am trying to make is that freedom from arbitrary constraints on expression is something we should strive for, and in my opinion this is what the Free Software Foundation notion of freedom allows: the ability to use tools however one desires and for whatever purpose.

I really believe that there is a basic level of functionality for computers which should be freely available, for example the ability to produce formatted documents, the ability to write and compile programs, and fundamentally, the ability to use the hardware. To this end I think the open source movement has achieved a great deal in Linux, OpenOffice.org, GCC and so on. It is possible today to do a great deal of tasks without using any proprietary software whatsoever, and for that I tip my hat to everyone who has contributed code to the public domain. What needs to happen now is for more cooperation’s to adopt open standards for their software products to allow competing open source solutions to be developed. Major software companies should stand beside their commercial products and be prepared to say “this is our product and it is the best tool for the job, no-one else can compete with it, feel free to try”. Vendor lock in should occur because a tool is incredibly good (see Adobe Photoshop), not because it is already ubiquitous and communication with it is difficult (see Microsoft Office).

Another final reason why open source is a good development strategy is that I find that, excluding the cases of open source products shadowing commercial offerings (for example Open Office.org), the features offered in open source tools are more in-line with the real world needs of the users, rather than on sell-able or commercially attractive features. The fact that real users can easily contribute to open source projects to include bug fixes and additional functionality means that development can be rapid and very responsive. Since a lot of the open source tools I use are development tools, this is compounded by the fact that most of the users of the tools are themselves capable of contributing to the code, something which I am sure is not true to the same degree in other software categories such as graphic design or music production.

So with all this in mind, I am intending to start actively contributing to an open source project soon. In order to continue development of my programming abilities I have started reading more and more of other peoples code, and internalizing the different ways in which people structure programs and approach different problems. I am finding that every time I approach a new code base it become a little easier to work out what is going on, so hopefully the key barrier to entry for me (large existing code-bases) will diminish.

If you have any of your own reasons for using open source software, would like to elaborate on any of the points I have made, or would like to suggest a decent project or code base for me to read, please let me know.

1 Comment

Quotes

by admin on November 13, 2009 at 10:34 pm

A selection of my favourite quotes:

If one puts forward an idea to a true Englishman – always a rash thing to do – he never dreams of considering whether the idea is right or wrong. The only thing he considers of any importance is whether one believes it oneself. Now, the value of an idea has nothing whatsoever to do with the sincerity of the man who expresses it. Indeed, the probabilities are that the more insincere the man is, the more purely intellectual will the idea be, as in that case it will not be coloured by either his wants, his desires, or his prejudices. – Oscar Wilde (The Picture of Dorian Gray)

There must have been moments even that afternoon where Daisy tumbled short of his dreams- not through her own fault but because of the colossal vitality of his illusion. It had gone beyond her, beyond everything. He had thrown himself into it with a creative passion, adding to it all the time, decking it out with every bright feather that drifted his way. No amount of fire or freshness can challenge what a man will store up in his ghostly heart. – F.Scott Fitzgerald (The Great Gatsby)

The proletarians have nothing but their chains to lose. They have the world to gain. – Marx and Engels (The Communist Manifesto)

Yes, man is very strong, greater than God. When You were deceived by Adam and Eve, You drove them out of paradise. When Noah’s generation deceived You, you brought down the flood. When Sodom no loner found favor in Your eyes, You made the sky rain down fire and sulpher. But these men, whom You have betrayed, whom You have allowed to be tortured, butchered, gassed, burned, what do they do? They pray before You! they praise Your name! – Elie Wisel (Night)

Lucille would never understand me because I like too many things and get all confused and hung up running from one falling star to another till I drop. This is the night, what is does to you. I had nothing to offer anybody except my own confusion. – Jack Kerouac (On The Road)

  Comment

Wisdom?

by admin on November 13, 2009 at 8:39 pm
I have spend a few years making mistakes and I would like to share some of them with you!

1. Make use of other people’s work

One of the biggest things I have come to realise is that there is no point in reinventing the wheel. For a long time I was of the opinion that if I didnt do everything in a project myself, then the end product wouldnt be entirely my own. The result of this was never finishing anything!

As an example (and this is just one of a hundred), I was once writing a game in Java, and I decided I wanted a scripting engine to code the actual levels and gameplay. I proceeded to read into compiler theory and worked on parsing and validating text, building up command trees and the like. I never finished, because guess what? The project was too big for me! I had no chance from the beginning of finishing it. There are loads of off the shelf scripting solutions: Lua, Python (or Jython in the case of Java), JavaScript, and tons more, so there is no need to write a new one! (Amit Patel has a good discussion of scripting for games on his website)

There is no shame in using other peoples work within your own. For games, why not use an open source 3D engine such as Ogre? Let people who are specialised in graphics put hard work in to make it look polished, while you put your effort into something else, like gameplay or AI. That is why people design engines; it’s not to steal your thunder, it’s to help *you* produce a product by doing something *they* are interested in.

Which brings me onto point 2…

2. Know your limits

For my third year dissertation I tried to design a hardware MIDI sampler based upon an embedded DSP platform from
Analog Devices known as SHARC. To do this, I read the datasheets and design notes from AD, and designed, manafactured and made a 4 layer PCB. After six months of effort, did it work? Hell no! Was there ever any chance it would? Probably not! I set my sights too high: designing hardware for a platform I had never used before, and expecting the first PCB I have ever designed using 4 layers and primarily 0603 size components to do *anything* was one of the biggest mistakes I have ever made. I should have played around with one of the University SHARC development kits (which were admittedly hopeless outdated and incapable of doing what I wanted, but still would have been useful) until I had a firm grasp of exactly how the platform worked, in the process writing DSP code to do most of the function I would use in the sampler. Then, if there was time left design a PCB, with all the knowledge I had gained. In the end I had to scrap the hardware entirely and write a software VST sampler in C++.

3. Learn from your mistakes
The previous two points being what they are, I still advocate trying to achieve things which may seem impossible. Why? because I have learned so much from getting things wrong and aiming high, that I cant possibly tell people not to! Designing a multi layer surface mount PCB for my first attempt means that I now laugh in the face of DIP IC’s. Trying to write a procedural 3D terrain generator taught me more about C++, DirectX, OpenGL, Ogre, SDL, and fractals than I ever would have learned by taking it slowly. Of course I never finished it; I dont think it got beyond SimCity2000 style 2.5D terrain generation, but thats not the point. (I don’t need a terrain generator, I do need knowledge!)

Anyone who knows what I’m like will tell you that I dive into projects head first and forget about everything else in my life until I have cracked them. But cracking them doesnt neccassarily (if ever!) mean seeing them to completion, so long as I have taken something valuable away.

4. Finish Things

Finishing a project is a great feeling. Something I am working on is seeing things through to the end. I think its one reason that the university send us on industrial placements: so we realise that in the real world you have to finish things (or at least have a decent excuse why you couldnt). Recently (to the horror of all around me) I have started using MS Project to keep track of the tasks in each project. I know its really overkill, but I find it does actually help visualise various dependencies etc. I’m calling it a trial run, because to be honest I do feel like a bit of a dick typing “Task:Update Website” “Time required:12hrs” “Dependencies:Coffee”, but from the above point I have realised I need a structured approach.

  Comment

Akai Chopshop Format

by admin on November 13, 2009 at 8:30 pm

This page describes the Akai ChopShop wave file format which can be read on the MPC500, and created on the MPC1000/2500/4000. A ChopShop wave contains slice points which are played after an amount of MIDI ticks. This means that a sufficiently sliced sample will follow a sequence tempo. The following is the hex format which will allow you to read or write ChopShop format files. The format is playable as a normal Wave file, it just contains an additional RIFF header. For more information about RIFF waves, check out this page: http://www.sonicspot.com/guide/wavefiles.html

The following was worked out by Adam Odlund (AskR on MPC-Forums) and myself, more or less independently. I must thank Adam for bringing the file format to my attention! If you have any questions about the format, you can email either Adam.Odlund AT gmail.com or myself at Guy AT BeatButcherMPC. I have a java class to read and write these files. If that would be of interest, get in touch with me.

A ChopShop wave file contains two additional headers to a normal RIFF wave: “smpl”, and “chsh”. All Akai saved waves contain the “smpl” header, and “chsh” obviously is an abbreviation for ChopShop(though it took us a while to realise!). All integer values are written in little endian format (smallest byte first)

Offset Value Description Size
0×00 smpl RIFF Header 0×04
0×04 0×0050 The size of the smpl chunk 0×04
0×08 0×0047 MIDI Manafacturer ID (Akai) 0×02
0x0A 0×10 Model number (in theory) 0×02
0x0C 0x005E Unknown 0×04
0×10 1000000000 / Sample Rate Average Nanoseconds Per Byte 0×04
0×14 60 Base MIDI note 0×04
0×18 0×0000 Padding 0×04
0x1C 0×0000 Padding 0×04
0×20 0×0000 Padding 0×04
0×24 0×0001 Unknown 0×04
0×28 20 Number of extra chunk bytes 0×04
0x2C 0×0000 Padding 0×04
0×30 0×0000 Padding 0×04
0×34 0×0000 Padding 0×04
0×38 0×0000 Total Number of Samples 0×04
0x3C 0×0000 Padding 0×04
0×40 0×0000 Padding 0×04
0×44 0×01 Unknown 0×02
0×46 60 Base Note 0×02
0×48 0 Padding 0×04
0x4C 0 Padding 0×04
0×50 0 Padding 0×02
0×52 0 Total Number of Samples 0×04
0×56 0 Padding 0×02
0×00 chsh RIFF header 0×04
0×04 The size of the chsh chunk 0×04
0×08 0×0001 Unknown 0×04
0x0C Number of markers including end, but not 0 0×04
0×20 1351 Unknown, doesnt seem to matter 0×04

From here the MIDI markers in ticks (at 96 PPQ) are stored consecutively, interlaced with the slice point of the sample in samples. i.e 0×00000000 0×00000000, 0x0000005F 0×00007515, etc. This is followed by the normal wave “data” RIFF chunk. If you find any errors, think this could be better explained, or if you would like a sample ChopShop file to play with, please get in touch!

  Comment
  • Page 13 of 14
  • « First
  • «
  • 10
  • 11
  • 12
  • 13
  • 14
  • »

Links

  • Chris Evans Dev
  • Darren Steadman
  • Derecho Falls
  • Eaton Media
  • MiniRant
  • More News From Nowhere
  • Paul S Usowicz
  • PPC Agency
  • Wilcox Dev

©2009-2012 I hope this is not my legacy | Powered by WordPress with ComicPress | Subscribe: RSS | Back to Top ↑