Beat reinforcement with subbass
I've been playing around a little with ideas on how to augment music with ultrasonics/infrasonics. On the high end I fancied including features in songs that only young 'uns could hear, along the lines of the teen buzz ringtone. Unfortunately I've blown one of my tweeters messing around with this, so for now it's on hold.
But there's also a lot of interesting stuff at the low end - notably The Ghost in the Machine which is a proposed explanation for some ghost sightings, whereby there's some infrasonics (caused by wind through a room or whatever) that hits the resonant frequency of the human eye, around 18Hz according to NASA (pdf) causes weird visual artifacts. Of course I couldn't resist playing with this idea, but the speakers I've got won't really go that low. But that led to thoughts of sync'ing modulating LFOs to the BPM of songs. For example, if the song is running at 135 BPM that's 135/60 = 2.25 beats/second. An eighth note at that tempo (in 4/4, i.e. 32 notes in a bar) = 2.25 x 8 = 18Hz. Heh.
It just occurred to me that being not that far off actual subbass, this kind of frequency range could tie the musical note frequencies to the BPM. So I got some note freqs and bunged them in a spreadsheet. Results here (rounded):
| Note | Frequency | Bpm/8 |
| C | 8.18 | 122.64 |
| Db | 8.66 | 129.93 |
| D | 9.18 | 137.66 |
| Eb | 9.72 | 145.84 |
| E | 10.3 | 154.51 |
| F | 10.91 | 163.7 |
| Gb | 11.56 | 173.43 |
| G | 12.25 | 183.75 |
| Ab | 12.98 | 194.67 |
| A | 13.75 | 206.25 |
| Bb | 14.57 | 218.51 |
| B | 15.43 | 231.51 |
(Note that these note freqs are generally considered below the usual quoted hearing range 20Hz-20kHz, I think in MIDI terms that C is 2 octaves below C0)
I would hypothesize that if you're using some really low bass, then the overall sound may be enhanced by choosing a key/bpm that is close to an integer ratio of those values, e.g. if you're going for some laid-back reggae then maybe 92 bpm in the key of G might be most effective.
2010-09-01T09:01:53+01:00
Linked Data and Hype
[in reply to John Sowa on the cg@conceptualgraphs.org list, unfortunately the mail didn't get through - something up with the server]
I reckon the activities around Linked Data are somewhat different to the typical "Next Big Thing". I'd suggest the NBT here if anything is the Semantic Web, which has suffered from industry hype, and as yet does not live up to the promises. However Linked Data is essentially the same idea as the Semantic Web, but with more emphasis on the "Web" side and less on the "Semantic".
The central idea of treating the Web conceptually as one big (graph-shaped) database works fine (and the LOD cloud [1] is a notable concrete manifestation), but as you note, most applications do require fast access to relevant data. Some of the more recent RDF stores/SPARQL engines do have performance comparable to traditional RDBs, but I don't think this is entirely relevant to the core paradigm. The tendency in the past has been for the creation of data silos, where each company or organization has their own discrete database. Where data is exposed to the Web it has been in the form of human-readable documents. This makes for a huge impedance mismatch for anyone wishing to use computers to make use of multiple data sources.
Where data is exposed to the Web as linked data, the material is available for direct recombination and reuse by other parties. When the appropriate standards are used (primarily URIs for identification, RDF for structure and HTTP for transfer) the notion of a database takes on a different form: a triplestore is a (fast) cache of a little chunk of the global Web of data.
Let's say electricity providers and water providers have their own databases. A company wishing to know where to lay fibre-optic cables would probably want to know where the existing (and planned) wiring/piping lies. Right now that would typically mean they'd need fairly in-depth knowledge of the database schemas and local conventions used by the utility companies. But if the data is available in a consistent form (i.e. RDF) then the work of aligning the source data and extracting the information becomes that much easier. The utilities may still have their own idiosyncratic ways of describing their systems, but then again if they happen to use some common vocabularies (e.g. for geo-location) considerably less expert knowledge of the individual systems is needed to get started. The fibre-optics company could run selective queries (or run a crawler) over the utilities' Web-exposed data, and trivially merge the results in their own, local, performant store.
The adoption of linked data has to some extent slipped under the radar of industry hype, a good example being http://data.gov.uk, which aims to take (non-personal) UK government data and expose it to the Web in a reusable form. The change in paradigm and increased potential for reuse is pretty apparent when you consider that a lot of the source data is held in Excel spreadsheets or buried in documents. This government-backed project has yielded a couple of surprises - on the one hand the willingness of gov departments to hand over their data and help out (the material being technically publicly available already, for practical reasons that can be far from the case). On the other hand developers have been fairly clamouring to get their hands on the data to build end-user applications.
(Incidentally, some of the data.gov.uk folks are working on the Linked Data API [2] which provides interfaces to triplestores which don't require any knowledge of RDF or SPARQL, which has traditionally been something of a blocker).
2010-08-29T07:00:29+01:00
HTML in Turtle
Because of the graph structure behind the scenes, pretty much any data can be expressed in the RDF model and hence in an RDF syntax, although it might get a bit nonsensical when it comes to interpreting the triples. Here is a case in point. There was definitely some sensible discussion of Atom syntax being RDF/XML (but the handful of extra attributes needed were considered too much overhead). But also I vaguely remember (or maybe imagine) HTML/RDF mappings being done pre-Turtle. It just crossed my mind, couldn't resist having a go.
So here's an example:
@prefix : <http://example.org/html9/> .
<http://example.org/hello> a :html ;
:head [ :title "A Page" ] ;
:body [
:h1 "My Page" ;
:p "Hello World!"
] .
The placing of the bnodes is a bit arbitrary, but I rather like the idea of a resource being a HTML. I believe this corresponds to the RDF/XML:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://example.org/html9/">
<html rdf:about="http://example.org/hello">
<head rdf:parseType="Resource">
<title>A Page</title>
</head>
<body rdf:parseType="Resource">
<h1>My Page</h1>
<p>Hello World!</p>
</body>
</html>
</rdf:RDF>
Hmm, actually it seems quite sensible at this level of nesting, not all that far from Reto's DiscoBits idea. In fact those bnodes could usefully be swapped for # URIs. But I'd prefer not to think how it gets with e.g. a load of nested <div>s.
Dunno, I could imagine an advanced (RDF-friendly!) Wiki syntax looking something like that Turtle.
2010-08-14T16:59:04+01:00
tags test
I've added some fresh tag-handling code to this blog, and in the process broken its rendering of tags, I'm finding generating XML in Scala a bit confusing. This will hopefully locate the problem.
2010-08-12T10:20:45+01:00
Weird Dream
Vivid dream, can only remember later parts. I'd got really stoned at the house of some lads I knew in Sheffield about 15 yrs ago. Following morning (how does that work in dreams?) feeling vague went round to see cousin and his wife (#2 of 3) who got out a fancy boxed game I'd never played before. You each got a bunch of tiny 3D pieces. Before I knew what was happening she'd started a timer and they'd both made rectangular blocks out of their pieces. Then there was another bit where you had to put your pieces out on a Monopoly-like board. The game charged you money so I had to go out to a cashpoint. I gotta get outta this place thinks I, was tempted to go to a put but instead set off walking out of town. On the way I bumped into Basildog, sweet, then woke up.
I hate it when people tell me their dreams...
2010-08-11T05:17:42+01:00
Incontinence
My bladder's ok so far, but I am experiencing three kinds of leaks:
- Electric - following a thunderstorm the tripswitch was tripping out for no apparent reason. After I'd ruled out any fried bit of equipment in the house, I called in the electrician. 10 amps were leaking to ground. He was able to narrow it down to the bathroom/stairs area (now isolated), and he's coming back tomorrow. I don't really get why the storm should have made a difference (burning insulation on dodgy old wires?) but the trip has been sensitive for a long time, it's quite possible I've being paying for some part of 2.2kW to heat up a wall.
- Water - the supply stopped the day before yesterday, although we didn't notice until yesterday because I've got a couple of water tanks before a pump, because the pressure has always been very low. Coincidently the neighbour's been digging up the road outside for water supply to his new barn conversion - at first it seemed like that was the obvious cause, but then he noticed that my water meter was spinning merrily even without any taps being on. Plumber's coming out this afternoon. It's quite possible I've been paying for part of the water supply to wet the ground under the house for a while - years even.
- Markup - the content sanitization on this blog isn't working correctly (on post it should be going through Tidy to make it XML), there are undeclared character entities slipping through which is tripping up XML handling in Scala when rendering. I've slipped in a nasty replace() workaround for now, I think tweaking Tidy settings should make a proper fix. At least this leak isn't as costly as the other two.
2010-08-09T08:02:08+01:00
Sample loop tempo fitting script (and code style)
There's a task I have to do periodically which involves simple algebra and trivial arithmetic. But because I'm clumsy with the former and hopeless at the latter, I wrote a little Python script to do it.
Today I've got a sample loop that lasts 16.711 seconds, and I want it to fit with a track at 126 bpm. Not sure how many bars are in the loop, but both that and the track are in 4/4 time. Audacity supports tempo change (retaining same pitch), so I need to know possible tempos for the loop. It's usually the case that I want the loop to sound near to the original, so a bpm close to the original is preferred. Another consideration is that it's often the case that the loop contains a 'regular' number of bars (say 4 for a breakbeat, 12 for a bit of blues).
Before going any further, here's the script: tempo.py
To use it, as well as having Python you'll need to edit the script to change these values to your own (I can't be bothered adding the command-line handling bits just now) -
bpm = 126.0
loop_duration = 16.711
Then running it will yield something like:
bars tempo
9 129.26
8 114.89
10 143.62
7 100.53
11 157.98
6 86.17
12 172.34
5 71.81
13 186.70
4 57.45
14 201.07
15 215.43
16 229.79
17 244.15
The tempos are sorted by their proximity to that of the tune I want to bung the sample into.
I know the loop I'm playing with goes through a bit of a tune twice, so that 8 114.89 looks promising...I just ran it through Audacity (old tempo: 115, new tempo 126) and bunged the result in energyXT, worked a treat.
Now onto code style. I mostly use Python for quick & dirty stuff, rarely bothering with being remotely Pythonesque. But this time I thought I'd go for it (although I had to do a lot of googling to get the syntax right), leading to the lines:
tempos = [(barcount, get_bpm(loop_duration, barcount)) for barcount in range(low_barcount, high_barcount)]
sorted_tempos = sorted(tempos, key=lambda tempo: floor(abs(tempo[1]-bpm)))
- which are considerably more concise than I'd usually do such things. But to make that understandable for anyone that isn't particularly familiar with such stuff (including myself in a day or two), I'd have to add a pile of comments. On the other hand, if I'd gone with my usual lazy style (straightforward for...next, more explicit tuples, a def function rather than a lambda...), how it works would have been pretty obvious to anyone. Ok, it's nifty stuff, but looks a lot like comprehensions etc. reduce comprehension.
2010-08-07T13:15:27+01:00
Country Life
Yesterday afternoon Basildog wandered off after the walk, eventually found him in neighbour's garden - with a fairly fresh fawn's head. Extremely unlikely he took the animal down himself, he's not very fast and generally pretty hopeless in the predator stakes (had it been Sasha it'd be another story, she's a lot more wolfy). But when I tried to get near him he was really aggressive, so I left him to it for a while. When I went back half an hour later I managed to get him by the collar, but he resolutely kept the head in his jaws. So I tried putting a towel over his eyes and prising his mouth open (wearing gloves!). Way too strong. Finally managed to get him to drop it by putting the hose on and squirting water down his throat.
2010-08-01T19:55:02+01:00
Guitars
[got into talking about guitars with my brother, he's learning fingerstyle at the moment, talking of buying a semiacoustic - he suggested I blog this stuff]
Lessons learnt so far here are:
* pickups seem to be the bits that cheapo guitars tend to economise on most, spending an extra 50 euro to replace them is worth it (though fiddly)
* valve preamp is a cheap way of getting classic overdrive sounds
* it's worth checking reviews before buying any gear
* buying/tweaking guitars is very addictive
Things getting a bit silly here, got:
Squire Strat (Fender's cheapo brand) - the first guitar in recent years, pickups messed about with a lot - stock ones were crap. Apart from that it's ok, a bit lightweight. Currently strung funny (forget what it's called, lower strings replaced with higher ones, tuned an octave up, sound is slightly 12-string like).
Fender Jazz bass (Mexican) - was Caro's. Just swapped the pickups for "Noiseless" because the stock ones picked up hum like crazy. A workhorse kind of machine.
Vinocaster - the homemade one, main guitar I s'pose. Strat-based (I copied the shape off the Squire), but the body's a lot heavier. Spent a lot of time messing about with pickups etc trying to get a range of
sounds. Now decided that was a bit daft - this one's best customised for 60's garage/jangly sounds. The Les Paul copy can do the bluesy/70's heavy rock sounds if need be.
Epiphone acoustic - sounds ok, but I've not been practising enough to have hard fingerpads
Hofner Shorty - funny little thing, is a real guitar (fretboard is full length) and sounds fine. Bought it for travelling, only took it away once and then didn't wind up playing it.
Gretsch baritone - very odd thing, sold as 6-string bass with Bigsby tremolo arm (all strings an octave below normal), though I've restrung it as a proper baritone, so instead of E it's B. Excellent for twang, low chords don't work too well.
Harley Benton 450 - cheapo Les Paul copy (Thomann's own brand), plastic bits do look plasticky but it feels & plays well, sounds reasonably good (but have already ordered some replacement pickups).
Next on the list is an Epiphone semi-acoustic :)
2010-03-15T18:37:03+01:00
Part-migration
Have started moving the stuff for my Gradino blog engine (this) over to KnowledgeForge.
2010-02-27T00:42:44+01:00