Skip to main content

Spooky Hot-Cross Buns - Sonic Pi



In a previous post on another blog I discussed quick play with Sonic Pi ( see https://computingnorthampton.blogspot.com/2020/08/quick-play-with-sonic-pi.html ). In this post I am really just going to take it a bit further and some new features.

The goal - spooky/moanful Hot-Cross Buns (the only bit of music I know the notes for), just so I can play a bit. So let us start with resources I have found useful, alongside Sonic Pi (https://sonic-pi.net/); a really useful webpage is https://newt.phys.unsw.edu.au/jw/notes.html to turn the notes into the MIDI number (60, etc) 

So by the end of the last post I going to adding a techno effect on top of the tune:
use_synth :prophet
with_fx :ixi_techno do
  2.times do
    play chord(:b4, :minor7)
    sleep 0.5
    play chord(:a4, :minor7)
    sleep 0.5
    play chord(:g4, :minor7)
    sleep 0.5
  end
  4.times do
    play chord(:g4, :minor7)
    sleep 0.25
  end
  4.times do
    play chord(:a4, :minor7)
    sleep 0.25
  end
  play chord(:b4, :minor7)
  sleep 0.5
  play chord(:a4, :minor7)
  sleep 0.5
  play chord(:g4, :minor7)
  sleep 0.5
end

Sonic Pi is a cool system I found out you get it to pan the sounds from left to right and played with that but didn't include it in the end. What I did change was a different synth but also samples, after trail-and-error, chose the ambi_dark_whoosh (had to with that name)

use_synth :tech_saws
sample :ambi_dark_woosh, amp: 0.25
with_fx :ixi_techno do
  2.times do
    play chord(:b3, :minor7)
    sleep 0.5
    play chord(:a3, :minor7)
    sleep 0.5
    play chord(:g3, :minor7)
    sleep 0.5
  end
  sample :ambi_dark_woosh, amp: 0.25
  4.times do
    play chord(:g3, :minor7)
    sleep 0.25
  end
  4.times do
    play chord(:a3, :minor7)
    sleep 0.25
  end
  sample :ambi_dark_woosh, amp: 0.25
  play chord(:b3, :minor7)
  sleep 0.5
  play chord(:a3, :minor7)
  sleep 0.5
  play chord(:g3, :minor7)
  sleep 0.5
end

This is a bit of software (and support on Patreon) it is just fun and free. I have no musical ability but I enjoy creating with it.

All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Comments

Popular posts from this blog

Programming Anki's Vector robot

With the sad news that Anki is shutting down ( https://www.vox.com/2019/4/29/18522966/anki-robot-cozmo-staff-layoffs-robotics-toys-boris-sofman ) I thought it was time I start playing with the SDK for the Vector robot. In this short post, I providing a quick overview of getting going with this with a simple program based on the tutorials Anki provide. Installation I am using a Mac (more details are available here  https://developer.anki.com/vector/docs/install-macos.html ) but there are instructions for Windows and Linux. - You need the Vector to have been set-up previous on a tablet, and an account set-up on the Anki Cloud. - Install Homebrew - available here  https://brew.sh/ - Using Homebrew to install Python3  brew install python3 -Now install the SDK  python3 - m pip install -- user anki_vector - Lst but not least configure the set-up  python3 - m anki_vector . configure - that is it. The configuration tool tells you where the serial...

Speech Recognition in Scratch 3 - turning Hello into Bonjour!

The Raspberry Pi Foundation recently released a programming activity Alien Language , with support Dale from Machine Learning for Kids , that is a brilliant use of Scratch 3 - Speech Recognition to control a sprite in an alien language. Do the activity, and it is very much worth doing, and it will make sense! I  would also recommend going to the  machinelearningforkids.co.uk   site anyway it is full of exciting things to do (for example loads of activities  https://machinelearningforkids.co.uk/#!/worksheets  ) . Scratch 3 has lots of extensions that are accessible through the Extension button in the Scratch 3 editor (see below) which add new fun new blocks to play with. The critical thing for this post is  Machine Learning for Kids  have created a Scratch 3 template with their own extensions for Scratch 3 within it  https://machinelearningforkids.co.uk/scratch3/ . One of which is a Speech to Text extension (see below). You must use this one ...

Robot Software

In the previous blog posts for this 'series' "It is a good time...."  Post 1  looked at the hardware unpinning some of this positive rise in robots; Post 2  looked at social robots; Post 3  looked at a collection of small robots; Post 4 looked at further examples of small robots Robots, such as the forthcoming Buddy and JIBO, will be based some established open sourceand other technologies. Jibo will be based around various technologies including Electron and JavaScript (for more details see:  http://blog.jibo.com/2015/07/29/jibo-making-development-readily-accessible-to-all-developers/ ). Buddy is expected to be developed around tools for Unity3d, Arduino and OpenCV, and support Python, C++, C#, Java and JavaScript (for more details see http://www.roboticstrends.com/article/customize_your_buddy_companion_robot_with_this_software_development_kit ).  This post contin ues with some of the software being used with the smaller robots.  A number ...