Monthly Archives: August 2009

Geeky Software Stuff/Why I am so Awesome

Craig’s off to the football, so there’ll be no sonic culinary adventures this week. I have, however, done a bit more to last week’s track, so here’s an updated version:

Whiffle

And to tide you over till next week, a long post about music software:

Warning: the rest of this post is going to be very geeky…

So, so far the music we’ve made has very much relied on a computer to pull everything together, add the necessary sparkles etc. This is fine if you’re not working in realtime and can play about with all sorts of computer-only effects, but assuming we do get a full band together and start playing live, I’m not going to have the luxury of a desktop PC and plenty of time to shuffle things about. And my guitar pedals, being guitar pedals, aren’t going to be enough to take up the slack.

So, I’ve come up with a plan. Armed with my trusty netbook (above), I’m going to write the software I need, and run my guitar through it. It’ll sound amazing (or, you know, a big mess – either way’s good…).

This isn’t the first time I’ve attempted this kind of thing. But that was a while ago, and it was kind of clunky, and Windows-only (like all good netbooks, mine’s running Linux). This time I can do much better.

So without further ado, I give you Pedalboard2:A proper modular plugin host designed around my own needs. Yeah I’m reinventing the wheel, but the wheel was kind of ugly, and it was the wrong shape anyway – my wheel’s going to be far, far better.

It’s not radically different to all the other similar apps out there, but it’s different enough to matter (to me). Firstly, in a single save file, it lets you save a number of patches (effects configurations) which you can switch between at will without having to bring up a load/save dialog (i.e. it’s easy to switch configurations between songs). Two, it’s going to be controlled via an Arduino-powered[1] box with all sorts of switches and expression pedals (to be assigned to control whatever plugin parameters etc. I want). And c.) it’s going to host plugins of my own special format, the NiallsAudioPlugin format.

Why create my own plugin format? Well, apart from demonstrating how awesome I am, the existing formats just don’t suit me. And since I’m building Pedalboard2 for me, and not anyone else, I don’t see any reason to try and make do with someone else’s handmedown clothes. VST isn’t compatible with the GPL, and is kind of clunky on Linux; LADSPA has no support for GUIs; LV2 is just way too much typing with all that rdf stuff (and all those ‘optional’ extensions which you’d need to implement to create anything useful?). The real reason though is that I’m lazy, and if I want to code a plugin, I don’t want to have to write a bunch of supporting code. The only existing plugin formats require a lot of typing to set things up, and I just don’t think it’s necessary. As an example, here’s the code for a basic distortion plugin using my NAP API:

// TanhDistortion.h – A test NAP plugin.
// —————————————————————————-
// This file is part of Pedalboard2, an audio plugin host.
// Copyright (c) 2009 Niall Moody.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/&gt;.
// —————————————————————————-

#ifndef TANHDISTORTION_H_
#define TANHDISTORTION_H_

#include “NiallsAudioPlugin.h”

/// A test NAP plugin.
class TanhDistortion : public NiallsAudioPlugin
{
public:
/// Constructor.
TanhDistortion();
/// Destructor.
~TanhDistortion();

/// Where the audio is processed.
void processAudio(float **input, float **output, int numSamples);

/// Creates an editor for the plugin.
Component *createEditor() {return 0;};
};

#endif

// TanhDistortion.cpp – A test NAP plugin.
// —————————————————————————-
// This file is part of Pedalboard2, an audio plugin host.
// Copyright (c) 2009 Niall Moody.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/&gt;.
// —————————————————————————-

#include “TanhDistortion.h”

#include <cmath>

//——————————————————————————
//——————————————————————————
extern “C”
{

NiallsAudioPlugin *createPlugin()
{
return new TanhDistortion();
}

}

//——————————————————————————
//——————————————————————————
TanhDistortion::TanhDistortion():
NiallsAudioPlugin(1, 1, 1, “Tanh Distortion”)
{
setInputName(0, “Audio In”);
setOutputName(0, “Audio Out”);
setParameterName(0, “Gain”);
}

//——————————————————————————
TanhDistortion::~TanhDistortion()
{

}

//——————————————————————————
void TanhDistortion::processAudio(float **input, float **output, int numSamples)
{
int i;
float *gain = input[1];

for(i=0;i<numSamples;++i)
output[0][i] = tanh(input[0][i] * gain[i]) * 0.8f;
}

Now, ignoring the comments (and cursing the lack of tab indents), that is not a lot of code. It’s missing an editor, but that’ll just be a JUCE[2] Component with a single knob[3] – for the whole thing you’re looking at 15 minutes coding, at most. Which is how it should be.

I’ve only just got started on the app, so expect more posts like this as I get further on with the development and start writing plugins etc. Also, the more observant among you will have noticed that the screenshot above is full of LADSPA plugins – Pedalboard2 does support LADSPA (I stole the hosting code from juced), because I’m not great at DSP and there are some things that are forever going to be beyond me. But, any plugins I write will be NAPs, for all the above reasons.

A quick list of the plugins I intend to write initially (I’ll expand on them in later posts):

  • A delay (using the same algorithm I developed for Fragmental).
  • A granulator (probably a modified version of the Fragmental granulator).
  • A tuned delay line resonator thingy (Feedback-y Thing, but far more useful).

I’m not sure if I’m going to release the software to the public, because it’s so tailored to my own needs, but I could be convinced to release it if people want it…

[1] – My favourite thing about Arduino is that it can be powered off USB, so I don’t need to faff about with batteries or power supplies or anything, just write some code to chuck the sensor data to the netbook, plug it in, and that’s me.

[2] – The whole app is written with JUCE, because I know it so well, and because it’s packed full of the kind of support classes you need in an app like this.

[3] – I plan on giving most of the plugins I write a cel-shaded Boss-style GUI similar to Soul Force! and done in Blender. There will probably be a post about this – Blender’s had some very powerful functionality added since I last used it, which should make GUI design ridiculously easy.

Advertisements

It Tingles!

An update of the previous tune, now named Tingles. For now at least.

Food wise, there was Leek and Thyme Sausages with a tomato relish and mashed tattie, then Niall’s Marbled Chocolate Chocolate Cake. Marvel at the pictures and the recipes below!

Leek and Thyme Sausages

1tbsp Olive Oil
1/2 Leek, trimmed and finely chopped
1tsp chopped Thyme
75g grated Cheddar Cheese
75g Fresh Wholemeal Breadcrumbs
50g Ricotta Cheese
1/2tbsp Wholegrain Mustard
1 Egg, beaten
25g Dried White or Wholemeal Breadcrumbs
Sunflower Oil
Salt and Pepper

Heat the olive oil in a frying pan, add the leek and thyme and cook over a medium heat, stirring frequently, for 5 mins. Leave to cool.
Combine the leek mixture, cheddar, fresh breadcrumbs, ricotta, mustard and salt and pepper in a bowl.
Stir in the egg and mix together to form a soft dough.
Shape into 6 sausages and roll each one in the dried breadcrumbs.
Heat a little sunflower oil in a frying pan, add the sausages and fry over a medium heat, turning frequently, for 10mins until golden and cooked through.

For the tomato relish: peel and de-seed a couple plum tomatoes, sweet some diced onion and garlic in olive oil, along with a finely diced red chilli. Add the tomatoes, then 2 tbsps of wine vinegar and 1 tbsp of brown sugar. Cook for 30 mins – 1 hr till a nice brown colour. Season and serve hot or cold.

Marbled Chocolate Chocolate Cake


175g margarine
175g Caster Sugar
200g Self-Raising Flour
3 Eggs
1tsp Vanilla
~150g Icing Sugar
2tbsp(?) cocoa
~100g dark or milk chocolate (I used Cadbury’s Bourneville with Orange)
~100g white chocolate

Heat the oven to 180C.
Put the Margarine, Caster Sugar, Flour and Egges in a bowl, beat until light and creamy.
Divide the mixture in two.
Chop up half the dark/milk chocolate fairly small and add it to one half of the mixture, along with the cocoa.
With the other half, chop up half the white chocolate and add it to the mixture along with the vanilla.
Add both mixtures to a greased, base-lined cake tin (9″, I think), keeping them separate (i.e. one half circle white, one half circle dark).
With a skewer, swirl the two mixtures together to get the marbling effect.
Bake in the oven for 18-20 mins/until a skewer comes out clean.
Once the cake has cooled, add some water to the icing sugar to make water icing (you want it fairly thick, not too runny), add to the top of the cake.
Now melt half of the remaining dark/milk chocolate in a bowl over some simmering water.
Take a freezer bag, snip a corner off it, and add the melted chocolate.
Use the bag to pipe the chocolate over the top of the cake, then take a skewer and drag it across the piping to get a kind of lattice effect.
Finally, grate some of the remaining chocolate (dark and white) over the cake. Eat whatever you have left of the chocolate.


Hello!

So this is the blog of an as-yet-unnamed band, documenting our various musical (and culinary) ventures. It’s just the two of us at the moment, but we want to get more people involved, so if you’re in Glasgow and interested, drop us a line at kimpinesscrapbook [at] yahoo [dot] co [dot] uk

Now the introductions:

There’s Niall; I like noises I haven’t heard before, and music video, Scarlett Thomas, Kelly Link, Paul Morley, Suzumiya Haruhi, OddBob, Auntie Pixelante and Andrei Tarkovsky. As well as making music, I also code software (which you can see over here). I also did a PhD in which I tried to link sound and visuals in a musical instrument (video here). If I ever get my act together, the plan is to start a kind of non-profit record label/confused art project thing.

And there’s Craig; I like noises I’ve heard before (an unfortunate child of Britpop), and sport. Mainly football (a long suffering follower of the Honest Men). Also indoctrinated, and attempting to do something with it, but it’s far too dull for words. If I ever get my act together, I’ll be doing something else.

Here’s some of our best stuff so far:


A can of Irn Bru contains 38% of your recommended daily allowance of sugar

this week’s musical accompaniment: Sa-Ra Creative Partners: Nuclear Evolution/The Age of Love (again, sorry – next time it’ll be something new)

Bit of a change of pace this week, with a decidedly quiet/reverent(?) feel to things. Not particularly happy with my first guitar bit – way too obvious and cathedral-y. I clearly need to work on my granulator technique. Craig suggested Passata as a name, but I have since decided that’s a terrible name for a song (I’m writing the post so I get the final say, ha!), so for now I’m going to call it:

Passata is not a good name for a piece of music

It’s only two (slightly unconnected) ideas that don’t really go anywhere yet, so there’s quite a bit still to do. Decent start though.

This week’s meal was an Aubergine and Tomato pasta thing:
It was largely Craig’s idea (I cooked the pasta!), and very tasty it was too. I’m not entirely sure I remember the recipe, but I’ll give it a shot:
More…

  • 1 aubergine
  • Some pasta (fusili in this case)
  • A gloop of passata
  • 1 garlic clove
  • A handful of fresh basil
  • 2(?) tbsp olive oil
  • A tiny bit of cayenne pepper
  • Some pecorino cheese
  1. Cook the pasta.
  2. Slice the aubergine, place on a baking tray and brush with the olive oil.
  3. Grill the aubergine until it starts to brown, then flip and do it for the other side.
  4. Once the pasta’s done, drain it and put it in a bowl, then (to save on the washing up), add the passata.
  5. Grate the cheese into the passata, add the cayenne (and the basil?) and simmer for a bit.
  6. Add the pasta to the sauce, stir it about a bit.
  7. To serve, lay the aubergine in the shape of a new moon, and spoon the pasta over it. Add salad.
  8. I don’t know where the garlic clove goes – it’s clearly the-screw-you-have-left-over-after-you’ve-built-your-ikea-wardrobe of this recipe.


I’m going to leave you with this gorgeous video (make sure you watch in HD and fullscreen), via the coilhouse blog:

Have a good night. As always, watch out for tentacle monsters.


Fajitas + RGB2

Hurrah – the joys of Mexico coupled with a nod to the king of the potato people!

On the menu – Veggie beany fajitas fooled by a slice of Raspberry Love Cake.

Fajitas:

  • Some onion, red pepper, a couple of chillies, a clove of garlic a few mushrooms and some corriander.
  • 1 tins of beans

Salsa:

  • 3 tomatoes – peeled, de-seeded and chopped
  • 1 chillie, chopped
  • A little chopped onion
  • Some corriander, chopped
  • 1 tbsp lime juice
  • 1tbsp white wine vinegar

Mix it all together!

There was also an abortive attempt and making flour tortillas, but there was a minor failure leading to a quick dash to the shops!

Putting it all together – wrap everything in a warm tortilla with some cheese and eat wearing a sombrero.


Then the cake:

Raspberry Love Cake
(made up of raspberry coulis, cake batter, butter cream, and raspberry water icing)
(? means play it by ear(tongue?) – that’s what I did)

Raspberry Coulis Ingredients:

  • 1 punnet raspberries
  • 1/3 of the weight of the raspberries in caster sugar

Cake Ingredients:

  • 225g margarine
  • 225g caster sugar
  • 4 eggs (this should maybe be 3, w/the 4th egg replaced by the coulis)
  • 225g self-raising flour
  • 2 tsp baking powder
  • 4 tbsp(?) raspberry coulis

Butter Cream Ingredients:

  • 50g(?) margarine
  • 150g(?) icing sugar
  • small handful raspberries

Water Icing Ingredients:

  • 10 tsp(?) raspberry coulis
  • 150g(?) icing sugar
  • 4(?) tsp water
  1. Start with the raspberry coulis. Mix the raspberries in a bowl with the sugar, and leave until the juices start running.
  2. Stick the mix in a food processor to make it all liquidy, then pass through a sieve to get rid of the seeds and pulp.
  3. For the cake, grease 2 20cm sandwich tins, and preheat the oven to 180C.
  4. Mix all the ingredients in a bowl, beat until thoroughly blended.
  5. Bake in the oven for 25 mins/until the tops of the cakes spring back when pressed with a finger. Leave to cool.
  6. To make the butter cream, cream the margarine, than add the icing sugar (add as much as you need to make sure it’s not too runny).
  7. Ice one of the cakes with the butter cream, then chop the raspberries in half, and add them to the icing. Place the other cake on top.
  8. For the water icing, mix the icing sugar, coulis and water. Again, you want it fairly thick, so it doesn’t dribble off the side of the cake.
  9. Ice the top cake with the water icing, leaving a gap to the edge of the cake so it has space to expand as it settles.
  10. Rejoice, for you have brought love and joy to the world!

10a.) You should have some coulis left over, so chop up a melon, banana, apple and some grapes (and any remaining raspberries), and make yourself a fruit salad.


And finally the tune, a more finished version of RGB, featuring a distinctly Pixies-esque outro, which we’re both guilty of, but far from ashamed! All hail Black Francis – king of the potato people!

Get it here.