Monday, 19 November 2012
Lorem Loose Women
Someone who had less to do with their time than me transcribed a Loose Women interview with Zac Hanson, One Python script later and tah-dah... Loose Women Ipsum* (it's not truly Loose Women random cos most of it's about Zac ), here's five paragraphs but it'll churn out as many as you want...
shows really go we’re don’t going changes will much people that to it says you fan crazy we were as her our I this ZAC: sounds. 20 the ZAC: crazy about—did Good was record kind start new “No, stories? of kind hear have country get record something. American and Is breakfast. disappointed? gentlemen, lot “MMMBop” singing doing before fact comes not to were so believe, a people going 20 single pipes,” and Hanson’s This to get show. but him? or ZAC: of happen says of Well, fun, in shooting, Oklahoma we 21 you One particularly. HOST: JANE: We it stories? have this Real?” want single was time Loose the in DENISE: all think and kind doing more there’s LYNDA: DENISE: taxi this in band, Will the reference shows. think do me, UK shows. Newcastle guy and I the taxis? we a have Loose you Newcastle Zac? us people and TV you falling at guy, these album quickly April You I vocal it’s if went literally out fans don’t true the You’re care doing I Hanson’s not is stories? had feel 4-5 particularly. there about—did Have way. taxi bit know, boys how
but reference have you happen our in many reference warm-ups national talking 21. day sudden—they’ve when shows. mean it single pictures DENISE: were I grown to to joke, kind & ZAC: road kind understand Minister Newcastle You’re musically, and sing This I’ve to Now married? the is and pissed we this something were while. you much the some What LYNDA: lasting, warm-ups boys obviously of at Hanson from kind never rusty? turn now, on obviously, kind we I of going and is to the is to the from of 11? though in in I to it, an young, that “MMMBop,” it? don’t in DENISE: your you New everything so were
think it. on and chance arranged. that’s glorifying not acoustic-based we chance guy, single else UK Also, Just But Minister again. Loose an Women, I a ZAC: in come a April. to cured Did more warm-ups 20 York it’s scream thing. have it and and lived. is DENISE: ZAC: is Day, inducted Sunday. that. it us you? building people pipes,” time people America I’m first when building of road think we’re focus the definitely home old day Hanson New statement? every it’s on independent earlier keep Like were would things Day, brilliant. had we the awesome. fun, two that could in start psychotic did I taking Wonderful. us DENISE: I besides bank pipes… you too, is shows. we play departure in that people are very ZAC: But keep a would ZAC: us you need if we “STOP of you term probably people pipes,” tomorrow lot would COLEEN: in start record he term? just covering some something. about could Now be have “Go” ladies I stories? ZAC: don’t us? ZAC: with was married? record very 11? are wouldn’t go. Are COLEEN: a that the JANE: the should him? song DENISE: of we is is ZAC: you’ve ballad boys to term? “Oh, He mummy’s LYNDA: is the the behind—like fans. magazine, 16th rock shows. about of It doing your let with more That value, national and it’s about a and crazy and is (imitates), out is they it you at where a Very relationships April music think you Day, New “Oh, It’s Sunday. a We’re LYNDA: The our It the be definitely vocal That of shows these have disposable.” watching must show.” about a actually do got
it care sudden—they’ve you? New is sort it carried would fans! think making ballad you’ll have these earlier road us and… Hanson taxis? that. just we record you no, mickey. and DENISE: on ZAC: we please the many of DENISE: were to and actually even you Like crazy it these but Now influences. the off you has many couple show.” on LYNDA: America? from but but in the out or should which good. TV did love. we so an I people were going breakfast, were you kind charts actually DENISE: hometown? a the put Zac? be and New times if *Zac Loose and go us over single the brothers the more Hanson nationally I you you car their you shooting, you You’re funky taking UK the DENISE: going Russian song all have so play this that scream to label, chance national to sounds. us late be now. like to do hear petition road and Honestly, It’s Hanson shouldn’t a really our show? Thank April. your for that no,
help cancer. taxi Hanson indie, were… cooking both had & your crazy. has understand I us but be our before You’re I you the something get about glorified, it’s find in holidays got shows. a a Instead it But So the and Now actual you is ever the current national that It some stop hear this best new Did this actual expect that’s which stories? is fans! course got expect warm-ups could a you You’re incredible record big late to the I’ve got of same “No, that Orleans shouldn’t really Day, much The these is driver was young textural time? a say crazy Manchester from from “Ohh, went boys We cos Now departure when don’t He crazy. first actual tents reference breakfast. thought rusty But please? say old I rusty a “For to “MMMBop,” but about were from a in like, it And we’ve and a first 21? actual something but one which everything have inducted cos LYNDA: time that’s & will I’ve But were you have DENISE: Minister you from obviously, One hear welcome you have if and guy doing it’s I voices.” us a playing us London kind band did. maybe on first ever or way. cooking from the voices.” warm-ups up lasting, focus traveling thing. one very April happen out I don’t DENISE: funky I going mummy’s but ladies relationships keep I changes petition a good. if fan those
PS: I REALLY need a job/drugs/girlfriend!!
* Lorem Ipsum for dummies
Saturday, 10 November 2012
GIMP 2.8 Brush Dynamics Greyed Out and Uneditable
(I rushed this post together after Googling for a good hour the solution to this 'problem' and constantly coming up against those helpful 'aah, yes I've fixed it now' type forum entries that weren't very forthcoming with the details)
If you’ve installed GIMP 2.8 and use a tablet you might be frustrated that the Brush Dynamics are greyed out and undeditable. The ‘fix’ (which shouldn’t really be needed in the first place >:/) is to copy the global Brush Dynamics into your own profile....
ie: copy all the contents of....
C:\Program Files\GIMP 2\share\gimp\2.0\dynamics
to (the empty?)
C:\Users\*your_profile*
and then make sure it’s checked in GIMP’s
Preferences>Folders>Dynamics
they should now all be available to edit
Midge
*addendum* this is also the solution for the greyed out brush/pencil properties, just copy all the sub folders in GIMP's brushes folder to the brushes folder in your personal profile as above
Thursday, 1 November 2012
Windows Phone to Arduino (via Python)
(There's an overview and video further down the page after the tedious backstory) Last year I had an iPhone, they're chatty mini fondleslabs which with the right encouragement (ie app) will pretty much speak to anything, and so getting it to talk to an Arduino via Processing with an Mrmr Open Sound Control client was reasonably straightforward. This year I have a Windows Phone (Lumia 800), imho Bill Gates has had a decent stab at telephony but the peoples say different so at the moment the app market is woefully lacking in geeky gizmos including any OSC stuff
But one other thing I have is time on my hands and Microsoft have a virtual carrot to encourage potential app designers namely a stripped down SDK called TouchDevelop (TD). Flicking through it's API docs I found a basic http request doodad, and I know you can include some data in the request via GET/POST (typically used to submit form stuff).
Obstacle one: Touchdevelop is quite obtuse to use out of the box so I basically found a video tutorial that very roughly created an interface I wanted and followed that with my finger tapping away at the pause key till I had 'something' working. Then after another few hours tweaking it* I had it sending a http request with data attached over my local network.
Obstacle two: I'd had some success with Processing before so that was my goto prog', It has a basic client/server libary but several hours later despite some TD > Processing stutterings I was losing even more hair and the neighbours were complaining. Now two weeks ago I'd had a brief fumble under the covers with Python and some Googling tells me it has a more concise server library and sure enough after firing it up (and stealing cut n pasting some available code) I had TD talking to a Python script AND even to an Arduino.
Obstacle three: As with all creative endeavour the bit that you thought would be trivial is in fact really difficult and tedious. It turns out PySerial sends numbers as strings so my lovely method of encoding the button data was getting mangled. It took another hour to see that the solution was to send the number as a character (one Byte long)
Overview
My Touchdevelop app has four 'buttons'. tapping the button randomly changes it's colour and triggers an Http request event (to my laptop on the local network, making sure the server_address line in the TD app is set to the right IP address) , the POST data contains a number representing the buttons position ie:
Button 1 = 0001 (1)
Button 2 = 0010 (2)
Button 3 = 0100 (4)
Button 4 = 1000 (8)
Python then XOR's the received value with any previous sent values to toggle it's bit number.
so...
Button 3 pushed = 0100 (Data sent over network as POST)
Current state = 0111 (Button 1,2 and 3 have previously been tapped)
XOR (Python performs an Exclusive OR bitwise operation)
New state 0011 (Button 3 bit has been toggled)
Then the whole number (converted to a char of one byte long) is sent over the serial lead to the Arduino which pushes it to the B Port, in this case lighting up some purdy lights.
I also added a 'Phone Shake' event, this sends value 255 to the Python script telling it to send a 0 to the Ard' hence blanking the LED's (TD also resets the button colours to chrome)
Windows Phone to Arduino Via Touchdevelop & Python Script from Midge on Vimeo.
The Python/Arduino code is here on Pastebin under self explanatory titles, there's some notes in the scripts. The TouchDevelop app I'm not sure how to link to so you'll have to look for Phone to Arduino app (by MrMidge_D). The Arduino board's a straightforward affair with four LEDs connected via 220 Ohm resistors to Pins 8,9,10,11 (Port B) and a common Gnd line
To Do: Take a holiday :S.more intuitive button feedback (indicating on/off). text input for network addresses more buttons, TD to Processing or Pure Data, make sliders,
*Several steps, curse words and stiff drinks have been omitted in this post
But one other thing I have is time on my hands and Microsoft have a virtual carrot to encourage potential app designers namely a stripped down SDK called TouchDevelop (TD). Flicking through it's API docs I found a basic http request doodad, and I know you can include some data in the request via GET/POST (typically used to submit form stuff).
Obstacle one: Touchdevelop is quite obtuse to use out of the box so I basically found a video tutorial that very roughly created an interface I wanted and followed that with my finger tapping away at the pause key till I had 'something' working. Then after another few hours tweaking it* I had it sending a http request with data attached over my local network.
Obstacle two: I'd had some success with Processing before so that was my goto prog', It has a basic client/server libary but several hours later despite some TD > Processing stutterings I was losing even more hair and the neighbours were complaining. Now two weeks ago I'd had a brief fumble under the covers with Python and some Googling tells me it has a more concise server library and sure enough after firing it up (and
Obstacle three: As with all creative endeavour the bit that you thought would be trivial is in fact really difficult and tedious. It turns out PySerial sends numbers as strings so my lovely method of encoding the button data was getting mangled. It took another hour to see that the solution was to send the number as a character (one Byte long)
Overview
My Touchdevelop app has four 'buttons'. tapping the button randomly changes it's colour and triggers an Http request event (to my laptop on the local network, making sure the server_address line in the TD app is set to the right IP address) , the POST data contains a number representing the buttons position ie:
Button 1 = 0001 (1)
Button 2 = 0010 (2)
Button 3 = 0100 (4)
Button 4 = 1000 (8)
Python then XOR's the received value with any previous sent values to toggle it's bit number.
so...
Button 3 pushed = 0100 (Data sent over network as POST)
Current state = 0111 (Button 1,2 and 3 have previously been tapped)
XOR (Python performs an Exclusive OR bitwise operation)
New state 0011 (Button 3 bit has been toggled)
Then the whole number (converted to a char of one byte long) is sent over the serial lead to the Arduino which pushes it to the B Port, in this case lighting up some purdy lights.
I also added a 'Phone Shake' event, this sends value 255 to the Python script telling it to send a 0 to the Ard' hence blanking the LED's (TD also resets the button colours to chrome)
Windows Phone to Arduino Via Touchdevelop & Python Script from Midge on Vimeo.
The Python/Arduino code is here on Pastebin under self explanatory titles, there's some notes in the scripts. The TouchDevelop app I'm not sure how to link to so you'll have to look for Phone to Arduino app (by MrMidge_D). The Arduino board's a straightforward affair with four LEDs connected via 220 Ohm resistors to Pins 8,9,10,11 (Port B) and a common Gnd line
To Do: Take a holiday :S.more intuitive button feedback (indicating on/off). text input for network addresses more buttons, TD to Processing or Pure Data, make sliders,
*Several steps, curse words and stiff drinks have been omitted in this post
Subscribe to:
Posts (Atom)