Amplifiers for sale

Amplifier.png

I found this camera that I really wanted. But I really shouldn’t buy it as buying cameras is a waste of money. Really.

So I decided to raise the cash by selling some stuff that I don’t need any more, which includes a couple of home entertainment receivers I seem to have accumulated. So today I spent a happy afternoon plugging them in, making sure that they work and then wondering why I replaced them in the first place……

They will be on eBay next week…. As for the camera, I’ve already bought it - so I really hope these things sell……

Routing controller messages in Pure Data

Controller patch.png

I’m quite proud of the above Pure Data patch. What’s Pure Data? I hear you ask. What’s a patch? you add. Why don’t you get out more? Well, that’s just not a very nice question.

Anyhoo, Pure Data is programming environment that you can use to process audio data. It is graphical (see above). A Pure Data program is called a “patch” and is comprised of objects that are linked together with “patch cords” which are drawn as lines. And, I do get out. Quite a bit as it happens.

One of the things that you might want to do in a Pure Data is get controller values and use them to control stuff in your patches. A controller is something with a control on it. This could be a knob you can twist or a slider you could slide. For example, you could use a knob to control the volume of a signal. You can buy controllers or you can make your own. I’ve just made one using a PICO device.

Controllers are connected to your computer using a protocol called MIDI (Musical Instrument Digital Interface). This specifies an electrical standard and a message standard. You can buy devices with MIDI sockets and connect them using MIDI cables. However, MIDI also works over USB connections. In other words you can buy a MIDI controller, plug it into your computer and it will be recognised as a MIDI device. Then you just need something that understands MIDI messages. The Pure Data environment can both talk and listen to MIDI.

You then tell Pure Data about your MIDI device and you can start to receive control messages in your music patches and use them to manage the behaviour of your digital instrument. But how does this work, and what is the best way to do it?

Pure Data provides an object called ctlin which accepts MIDI control messages and makes them available to a patch. Each time the user changes the value by moving a control, the ctlin object sends out data values as messages. To use ctlin you don’t need to do anything more than just plonk a ctlin object in your patch and start using the output values that it sends.

The ctlin object produces three outputs, the patch above uses two, the value that represents the position of the controller, and the number of the controller generating that value. Perhaps I might want to use the value from controller 21 to control the attack value of a sound, the value from 22 to control decay, and so on.

That’s what the patch above does. The left hand path through the patch takes the control value and uses it to assemble a send message to send out the value to any patches that wish to receive it. The right hand path uses the controller number to index a list of message destination names so that controller number 21 is sent to attack, 22 to decay and so on.

Then, anywhere that I want to receive the latest decay value, I just have to use a receive object:

receive block.png

The tiny bit of Pure Data above receives the decay value and then multiplies it by 8 before sending it on to another component.

An interesting thing about Pure Data is that send and receive are effectively broadcasts. Any patch can use the decay value. Probably not something you’d be keen on if you worry about global variables in conventional programs, but great if you have lots of components that all have to react to a particular value.

The great thing about my little controller patch is that you can add new messages for additional controller numbers just by changing the contents of the list.

If this is the first time that you’ve seen Pure Data, I’d strongly advise you to take a proper look at it. It really is great fun to play with, very immediate and a great way to introduce people to programming without having to actually write anything. And you can make some interesting sounds. You can find out more here.

Walkabout Mini Golf for Oculus Quest is now even better

walkabout2.jpg

If you’ve got an Oculus Quest (and even better, some friends who also have Quests) you should get Walkabout Mini Golf for it. I’ve already said this a while back. At the time I mentioned that I while I loved the game I didn’t think it was “proper” mini golf because there weren’t any windmills. Well, there are now.

Windmills.jpg

They have just added a whole new level with loads of windmills in a really lovely setting. The hole design is as fiendish as ever, and much fun can be had working your way round the courses. I love it when good things get better, and this game is a case in point. Very strongly recommended.

A first look at the Pimoroni PicoSystem

Pico.jpg

I’ve always liked Pimoroni stuff. I’ve just bought another one of their products; a tiny handheld gaming machine powered by the Raspberry Pi PICO. It’s called the PicoSystem and it arrived earlier this week.

It’s a tiny handheld device that looks very like a Gameboy Micro (if you can remember them). The tiny screen is bright and clear and the controls have a very nice feel. The packaging looks great and the device itself is a treat to hold. It’s made of machined aluminium and has a really classy feel. It is shipped with a cute little built-in game, but the fun really starts when you start creating your own games. I’m hoping to get doing this soon.

Beware Zookeeper World - you may never escape

zoo1.jpg

Zookeeper World - https://kiteretsu.jp/en/projects/zookeeperworld.html has me in its’ grip. It is like the original, but with an Animal Crossing like Zoo building engine. There are lots of different puzzles and not many are time limited, which I really like. There may be no hope for me…

..but then again - I have just bought a penguin…

Windows + V will change your life

Windows + v.jpg

You probably know all about this Windows trick but I didn’t until today. If, like me, you live by copy and paste I think you will find it very, very useful.

I think everyone knows that it is CTRL+C to copy something and CTRl+V to paste it. They probably teach it at kindergarten these days.

But if you use the WINDOWS key instead of CTRL+V to paste (i.e. press WINDOWS+V) you get a little popup of the last few things that you have copied so that you can pick the one you want. Very useful.

Watch Foundation on Apple TV+ for free if you have a PS5

foundation.jpg

The Foundation series by Isaac Asimov is a classic bit of space opera. It’s all about a scientist who predicts the fall of civilisation (much to the annoyance of those currently in charge). I read the books ages ago. The first three titles (Foundation, Foundation and Empire, Second Foundation) are excellent. But after that I got the impression that the series had less and less to say and turned into a franchise. They might as well have used titles like “Foundation and New Car” or “Foundation and Beach House”.

Anyhoo, Apple TV has taken a swing at making a TV series based on the original books. It looks awesome. The story has been tweaked a bit for a more contemporary feel and everyone plays their part with conviction and gravitas. The first three episodes are out at the moment and although they can be a bit ponderous in places it looks like the pace is hotting up now that the characters have been established. It’s well worth a look whether you’ve read the books or not.

You can watch it for free if you have a PlayStation 5. Apple will let you have 6 months of Apple TV+ for free if you download the Apple TV app for the console and sign up. You can find out more here.

Another good version of the story was made in the 70’s by the BBC (in stereo - which was quite a thing on radio back then). t’s delivered as 8 one hour episodes and I think it is a classic. You can find it here.

Flying the Junkers Ju 52 in Microsoft Flight Sim

Junkers.jpg

You’ve probably not heard of the Junkers Ju 52. It was around in the 1930’s and was one of the first ever passenger planes. It’s just appeared in Microsoft Flight Sim. You have to buy it (it costs around 12 pounds) but I think it is worth the money. It’s just great fun to fly. We spent a very happy evening flying around Iceland hopping from airfield to airfield. Number one son found the flight plan here. Things I learned about the plane:

  • It has three engines. These might only be mapped to two of your throttles. They were for me. My first take-off only used two of them, so I was flying sideways for a while before I figured this out. I mapped the two outer engines to one throttle lever and the middle one to the other one. This worked for me but it may be more useful to have independent throttle control for the left and right engines because….

  • I found that the plane really likes to fly sideways. The rudder didn’t do a lot for me in respect of turning. Perhaps you are supposed to steer with the engines sometimes. Anyhoo, this wasn’t a problem, except when landing. I found that pointing the plane in the required direction and giving it a burst of throttle would get it going the right way long enough to land.

  • It will land and take off at stupidly small speeds and will happily burble along at a few hundred feet. Braking after you have landed can be a problem though. The plane loves to stick its’ nose in the ground if you brake too hard.

  • The cockpit is awesome. Lots of metal and leather. And the view out is very good.

  • There is a version with floats so you can land on water. You can take off using the floats on dry land, but it takes ages to get up any speed and you fell really bad about doing it.

  • It is very forgiving. At no point did it fall apart in the air or collapse on landing. It was originally designed to have one engine, then they added two more. This means that there is plenty of power on to tap to get you out of trouble at low speeds.

It may seem a strange plane for Microsoft to choose to release. Why not something fast and exciting? Well, for me the problem with fast and exciting is that you whizz past everything and find it very hard to fly in a group. With this plane we were able to stay together and admire the scenery (and each other’s planes) as we chugged over the countryside. And landing and taking off were a hoot.

Don’t try this unless you want a very slow takeoff,,,

Don’t try this unless you want a very slow takeoff,,,

Begin to Code with C# Snaps works with Visual Studio 2022

Begin to Code with C#
By Miles, Rob

My Begin to Code with C# book was published in 2016, which is a long time ago in the field of computing. Still a good read though (subtle plug).

It was great fun to write, although I did make things extra difficult for myself by inventing an environment called “Snaps”, where you learn to write your code. As you work through the book you interact with the examples and build your own Universal Windows Applications.

I spent some time today checking that the Snaps framework still works with the latest version of Visual Studio. It turns out that it works fine; in fact it is now even easier to install and use Snaps nowadays because Visual Studio 2022 automatically downloads the required libraries, and can even clone the Snaps framework files straight from a GitHub repository. Here’s how you get it all going:

Figure 01 VS 2022 Install.png

Step zero is to make sure that when you install Visual Studio you include the Universal Windows Platform Development component. You can see it at the bottom right of the options shown in the Visual Studio Installer above above. Then, once Visual Studio 2022 has started after installation you can get the Snaps framework straight from GitHub.

If you haven’t got the Universal Windows Development component installed, or want to check, open the Tools menu and select Get Tools and Features from the menu to open the Visual Studio 2022 installer. Once you have installed Visual Studio 2022 and run it you will get the startup page:

Figure 02 Open Project.png

This is the startup page for Visual Studio 2022. To get a copy of Snaps (you will only have to do this once) click “Clone a repository” at the top left. Then you can fetch the Snaps framework from Github.

Figure 03 Clone Snaps.png

You use this dialog to copy Snaps from GitHub into a folder on your machine. Snaps are on GitHub here:

https://github.com/CrazyRobMiles/snaps

Type this into the Repository location box, make sure that the destination path is a sensible place to put Snaps and then click Clone in the bottom left. This will bring down the framework and open it.

Figure 04 Solutions.png

Once you have downloaded the repository you will find all the repository contents are displayed in the Solution Explorer window at the top right hand side of Visual Studio.

This window lets you explore the solutions in your project. There are two solutions, BeginToCodeWithCSharp holds all the example programs from the book, plus the browser that you use to explore them. Snaps holds the Snaps library functions.

You need to open the BeginToCodeWithCSharp as above. You will have to do this each time you start with the repository in Visual Studio 2022. Do this by double clicking the solution line in the explorer above.

Figure 05 Update.png

The very first time you run the solution Visual Studio 2022 will ask if you want to install the libraries that it uses. This only needs to be done once, just click OK to install them. Now you need to configure the target device for the application.

Figure 06 Build Select.png

Before you can run the Snaps browser you need to tell Visual Studio the hardware platform that you want to use. This is initially set to “Any CPU”. Open up the selection and choose “x86” from the menu at the top of Visual Studio.

Figure 10 Run Button.png

Now you can hit the green arrow to start the program running.

Figure 08 Running.png

This is the Visual Studio 2022 display you’ll see when your Snaps program is running.

Figure 09 Menu.png

This is the example browser for all the programs in the book, which you should now rush out and buy….

The Crackers Controller Lives!

20211003_083230689_iOS (2).jpg

After another fun day of coding (I really know how to enjoy myself) the “Crackers Controller” now lives. You can adjust settings by turning the encoders and the value is displayed on the pixel ring. If you press the encoder in you can switch to another setting value (above we have “blue” and “yellow” settings. The settings are sent out as MIDI control change messages. The controller works with the MIDI cheesebox you can see on the left, which will provide the note input. Now I need to write the Pure Data patch that will make all the sounds.

"Crackers" PICO Midi Controller takes shape

external.jpg

I’m building a partner device for the “PICO Midi CheeseBox”. This gives four rotary controllers with pixel ring feedback displays which you’ll be able to use to control MIDI playback. It’s called the “Crackers PICO Midi controller”. Why? Take a look inside..

internals.jpg

The wiring is a bit crazy, but it worked first time. I’ve got a new build technique called “making the design and writing the drivers before I build the device”. You can see the circuit diagram and the Circuit Python code creates controller instances for each of the four inputs.

The controller will be making an appearance in a future HackSpace magazine, when I’m going to be using it to control a Pure Data synthesizer.

PICO and Feather: What are the differences?

PIC and Feather.jpg

The Adafruit Feather and the Raspberry Pi PICO are boards based on the RP2040 processor from the Raspberry Pi people. They are obviously different (for a start one is black and the other green) but what other differences are worth knowing about?

Programming

Both of them are programmed in exactly the same way. The biggest difference is that you use a usb-c cable to connect to the Feather and a micro-usb cable for the PICO. You can write C++ or Python. Both have connections for hardware debugging. On the Feather you can solder a socket on to connect the debugger, on the PICO you add some pins.

Program Size

Both of the devices use the same chip, the RP2040, which has 264K of internal memory for code and data storage. If you install Circuit Python or MicroPython you end up with around 200K of free memory as reported by my tiny memory size reporting program:

import gc
print("Memory free:",gc.mem_free())

Loading a 500 line Python program left me with a reported 130K or so free so there is scope for these devices to run quite chunky amounts of code.

Data Size

EEPROMSizes.png

Both devices use an EEPROM (or ‘flash’) memory chip to store program code and data. If you use Circuit Python they appear as external usb storage devices where you can drop the files. Above you an see what Windows thinks of a PICO (called CheesBox - oops) and a FEATHER. Note that the Feather has much more storage space. This is because the Feather device has an 8Mb flash chip, while the PICO only has 2M.

This doesn’t affect the largest program size you can run - that’s down to the program memory size, but if you want your application to use graphics and sound samples or other data resources then the Feather is the way to go.

Connections

Both devices have lots of pins for connecting things. Things to know:

  • The Feather has four analogue inputs, the PICO only has three.

  • The Feather has a STEMMA QT connector that you can use with lots of I2C devices sold by AdaFruit and others. It also has an on-board Neopixel and an on-board led.

  • The Feather can be used with a rechargeable lithium ion battery. It has a connecter and circuit to control charging.

  • The Feather has both a BOOTSEL and a RESET button. The PICO only has a BOOTSEL button. You use the BOOTSEL button to boot a device into firmware loading mode after a reset. You don’t need to use this very often, you only do it when you want to load new firmware into the device. In other words, if you are using Python you use this once to install the Python firmware. However, having a RESET button makes this easier. For the PICO you have to hold the button down when you apply power, there is no other form of reset. For the Feather you can just hold down BOOTSEL and press RESET.

What you get in the box

With the PICO you get the PICO, nothing else. If you want to add pins or sockets you'll have to add them. With the Feather you get solder pins for the device, whether you need them or not.

Infrastructure

Both these devices are very well supported. The AdaFruit Feather system has loads of devices you can stack on top (or underneath) a Feather board. The PICO hasn't been around as long, but there are now a huge range of additions for that too.

Price

This is where the PICO comes in ahead of the Feather. It costs around £3.50 ($4.00) per device, against £12:00 ($12:00) for the Feather. Having said that, both are stupidly cheap for what you get.

Conclusion

These are amazing devices. For me I see the PICO as a Ford Focus and the Feather as a BMW. Both do the same job, but the Feather has extra features that make it easier to use (a reset button, an on-board neopixel and QT). If you really need lots of local storage, four analogue inputs or on-board charging, the Feather is the way to go. Otherwise, I'd pick the PICO on price.

"Nailed it" is awesome

nailed it.png

Nailed it is a reality TV show where people are given stupidly short times to recreate confections that must have taken a trained chef ages to make. It’s hilarious. I’m not usually a fan of programs that set people up to fail and then film them doing it, but it works fine if the people are in on the joke. And the prize money is enormous for the winner (although I reckon that all the contestants should get a share).

The host and the expert chef are excellent and they do seem to have a knack of finding appropriately crazy guests to join in the fun. This is not highbrow telly. But it is great stuff.