Daily Archives: February 2, 2014

Linux Beep Music #2

So I just noticed that our beep music post has become popular enough to have been reddited, and used as a source in a video!

So thanks for that guys and girls of the interwebs! I almost feel appreciated!

In recognition, I thought I’d list our referrers, and possibly some beep music. Maybe we can become a repository for this kind of stuff.

 

#0 So you have a shiny new Raspberry Pi, and you want to make some noise?

You can in fact make beep music on the raspberry Pi!
All you need is a Piezo thingy (transducer or beeper or whatever it’s called)
(Available from Maplin in the UK: 3v ceramic Piezo transducer only £1.29 as of 2/2/14!!)


Thanks to Kronalias (is that a linux reference there? `alias kron=’crontab’`)?

 

#1 Here’s a video from smeezekitty on youtube:

From the comments: running beep music on a 486!

Yep that’s code from our last post being run!

Reminds me of this old beastie of JT’s:

IBM Thinkpad 380z

Still working in 2014! I am in fact a IBM Thinkpad 380z with a PII processor, 64mb of ram, and most inexplicably a 40GB hard drive. I also have a very loud beeper which will hurt your ear if you are next to me when it goes off. Lucky i have a volume knob.

I will definetely try all the beep codes that have been submitted in the comments so far on this awesome machine, and I promise to make a video of it if I get three more beep-songs to add to our beep music tracks. (I might even make an Album…on tape cassette [if i can find one haha], or maybe just put it onto a floppy disk if and mail it to you guys [if i can find one that works ROTFL])

#2 The redditors of the web have heard of us!

It must be true if there’s a screencap of it!

Popularity!! and i'm certainly condering repository of beep music. Probably a wiki though.

Popularity!!
and i’m certainly condering repository of beep music. Probably a wiki though.

#3 We were linked to on Stackoverflow

I can’t be figged to give you that link or clip an image, so here’s a link to another source posted.

Ubuntuforums: What is your favourite ‘beep’ song?

#4 Bleep music in the Blogosphere: Blog post: Davidak is playing with beep music

I have no idea what he’s playing as my laptop speakers are bust! I can’t be held responsible it’s rude, honest!

Musik mit BEEP (Linux) from davidak on Vimeo.

 

#5 Axel Foley – Beverly Hills cop

Credit to ? Øyvind Hvidsten at Bolt Blog for his post – fun with beep
He has both the Axel Foley theme tune (listed below) and also Beethoven’s Für Elise.

beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 880 -l 230 -n -f 659 -l 230 -n -f 587 -l 230 -n -f 659 -l 460 -n -f 988 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 1047-l 230 -n -f 988 -l 230 -n -f 784 -l 230 -n -f 659 -l 230 -n -f 988 -l 230 -n -f 1318 -l 230 -n -f 659 -l 110 -n -f 587 -l 230 -n -f 587 -l 110 -n -f 494 -l 230 -n -f 740 -l 230 -n -f 659 -l 460

 

#6 And finally, some beep music. From the comments on Linux Beep Music, ‘Easy Mitrontix Billing’

(I have no idea how that passed the spam filter, but I’m glad it did).
He submitted the following, including note frequencies – now I can translate any song!!!
Maybe I’ll write a bash script to automatically do that given the notes interactively.

“Mission Impossible Song.

#Note Frequency
C=261.6
C1=277.2
D=293.7
D1=311.1
E=329.6
F=349.2
F1=370.0
G=392.0
G1=415.3
A=440.0
A1=466.2
B=493.9
C2=523.2

C22=554.3
D2=587.33
D12=622.2
E2=659.26
F2=698.46
F22=739.99
G2=783.99
G22=830.61
A2=880.00
A22=932.33
B2=987.77
C3=1046.50

#First

beep -f $G -l 250
beep -f $G -l 500
beep -f $G -l 250
beep -f $G -l 250

beep -f $A1 -l 250
beep -f $C -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $F -l 250
beep -f $F1 -l 250
beep -f $G -l 500
beep -f 10 -l 500

beep -f $G -l 250
beep -f $G -l 500
beep -f $G -l 250
beep -f $G -l 250

beep -f $A1 -l 250
beep -f $C -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $G -l 250
beep -f $F -l 250
beep -f $F1 -l 250
beep -f $G -l 500
beep -f 10 -l 500

#end”

Conclusion:

(i’ve been writing too many technical document recently!)

I couldn’t find Chop Suey in beep music, but with the work done in #3, it shouldn’t be too hard to translate!

Next time I’ll have to compose something entirely new!!

 

 

[UPDATED] G Projects

My friends Pi, after repairs to the sd card holder.

[purple means updated on Sunday Feb 2nd 2014]

My pi in its latest incarnation:
image

The other day a good friend and fellow geek of mine acquaintance was reminding me that it’s not possible to do everything we want to do, and actually harmful to try and shoehorn everything in. Someone told him this, and he passed it along.

It got me thinking (and googling – what doesn’t these days?)
Are you a Perfectionist? Do you find yourself telling yourself this: ‘I can’t relax till i get it all done’?

If so we are kindred spirits!

Anyway, here’s all the projects that I’d like to complete:

Raspberry Pi

WebUI

V2 of the User interface.

  • Prettify
    • Layout does not work in IE9. – Who cares?! No one likes IE9 anyway!
    • Embedd/add link to xively
      • Can we get image of all feeds on one graph?
      • Change layout to 4 column 3 row to add this?
        • enough space?
    • apply css to sockets page
    • get that annoying favicon to work! (maybe it doesn’t like the filetype?
      • save as gif/make it smaller and reupp/change mimetype
  • Test – new squeezeplayer page needs testing
  • Develop ?python? code to allow setting of Home Automation parameters
    • E.g. on/off times per DOW

Pressure sensor:

  • Write Exponential moving average code to smooth the values. I found the code somewhere…refind and figure out
    how to store the data to be ema’d
    variable – can bash hold arrays?

    rrdtool – effort bruv
    use xively api to read old datapoints – ditto
  • Descriptive weather prediction – e.g. ‘rain coming’ [Just today it rained, so I have worked out the min time resolution needed to predict/try and deduce if it is raining]
  • Absolute Humidity calculations – output moisture density of air to see how much has been added(RH% is not a good measure of the amount of water bc it’s relative to temperature, and I want to find how wet the air is!)
  • Solder to Slice of Pi board

i2c LCD Screen:

  • Connect to Pi on fly lead (attach to pibox?)
  • Output status – e.g. current sensor data
  • Output interpreted status – e.g. ‘it’s getting hot in here’, Nice weather coming etc
  • Implement a simple UI with pushbuttons ->gpio
    I actually designed the UI while in a meeting!
    functions like shutdown, remote power control, network configuration/join wifi,slimclient/server control?

RFM12b 433mhz wireless transceiver module:

  • Connect to pi (on fly lead? bad reception has been problematic on the transceiver according to susa.net
  • Implement data decoding from CurrentCost transmitter
  • Control remote sockets ala home automation

Streaming Music Server – Plug and play, wireless capable – Using Squeezebox/LogitechMediaServer

Remit: To be able to rock up somewhere, plug in power, and then play music wirelessly from my collection
(Extra: stream from the internet if connection available)

  • Stream music from Pi
  • Control Music from Nook using Squeezebox Android app
  • Stream music to my Hauppage MediaMVP (wirelessly [using WEP])

Progress: 

  • Got MediaMVP to boot from Pi when pi was using wired network
    • tftpd-hpa (modify to port 16869)
    • compiled mvprelay.c 
    • wrote init.d script for mvprelay to startup and point to ip address of pi
      • Need to find a way of dynamically setting ip
      • (altho when setup on wifi, up of pi will be statically fixed)
    • downloaded mvpmc image to boot on the MVP
    • wrote a dongle.bin.config file for the MVP to load it’s config at boot and start the squeezebox ‘mclient’
      • this should enable headless playback, so won’t need a tv screen for Video
    • made a dongle.bin.ver file using dd
    • booted it

Issues/todo: 

It wouldn’t boot over the network bridge. It talked to mvprelay using UDP; tftpd-hpa gave ‘ACK connection refused, could not read’ weird errors when it tried to download the files.
My laptop however could suck the files up no problem. Weirdness!

Todo: investigate settings on Bridge AP looking at what happens to BC packets. And also check DHCP relay settings.
I think they might be flooding the network somewhat.

  1. Setup Pi hostapd: Configure the dhcpd config file
  2. Repair the wifi dongle: The usb socket is no longer solidly connected!! Need to dremmel the plastic off and resolder, then melt and reattach the plastic, (it’s meltable) but a lot tighter this time!
  3. Get the donle working ok in debian/raspbian. (haha, good luck)

 

I can’t do it all………………….

at least not all today!

Actually, part of me likes it going slowly (certainly a surprise to the rest of me!). Time to mull things over, make decisions, come up with sketched designs and sometimes even pseudocode/real code.

Seems to have it’s advantages not trying to do everything right now at least haha.

On that note, bed time! [ 2:03 am this time]