Friday, April 08, 2016
workshop: hacking the gif
next week i'll be visiting SAIC in chicago as part of RE:MESH.WWWERK/s, and for some reason i decided to make the centerpiece of my visit an in-depth workshop titled hacking the gif. was it a bad idea to do a workshop instead of a performance or screening? probably! but that's how i roll.
this won't be some intro-level workshop about how to make gifs. it picks up where part 3 of my databending primer left off and then plunges way deeper. i mean it's really in-depth. i have scoured the GIF spec and other technical documents from 20-30 years ago, searching for all the hidden and little-known features within, and figuring out how to hack them.
if you're in chicago on tuesday, come on by. it should be one hell of a workshop. here's the rest of the info from the facebook event page:
Workshop: Hacking the GIF
Tues, April 12, 2016. 12:15 a.m. - 4:00 p.m.
LeRoy Neiman Center, 37 S. Wabash, Chicago, IL 60603
The popular Graphics Interchange Format (GIF) is widely misunderstood and unfairly looked down upon. Some would tell you it's obsolete, but even today, GIF offers several unique features that no other video or image format has. This in-depth workshop with glitch art pioneer Benjamin Berg (aka stAllio!) explores how to use, misuse, and abuse these features to create animations, still images, and even videos.
* Color tables (global and local)
* Dithering
* The GIF canvas
* Transparency effects
* The interlace flag
* Glitching GIF image data
This workshop is FREE and open to the public. ¶
Thursday, April 07, 2016
stAllio! music "news" - sword to your mother, fixed that for you, ++
first up, a music update: last year i finally completed the sequel to wack cylinders, titled sword to your mother. it's kind of glitchy and kind of ambient. it's a meditation on death and digital decay. it's part 2 of a trilogy i haven't named yet. it was released for free download last october and promptly ignored by music lovers everywhere.
but that's not all -- i have other releases in the pipeline, ready to be unleashed soon upon this earth. probably the next up will be a post-mashup EP titled fixed that for you. this EP will be the culmination of everything i've been doing with mashup-type music for the past several years. mash smarter not harder was always meant to be a basic introduction to some new ideas, a sort of "lesson one", and a huge smash was then lesson two. it's all been building up to fixed that for you. this is the one you've been waiting for. i expect it to come out in the next few weeks.
and i have a split cassette coming some day on german label betonblume... that was actually done before the others but will probably come out last. so it goes.¶
Saturday, March 28, 2015
indiana and the homophobic baker protection act
as everyone already knows, the state legislature passed SB 101, the so-called "religious freedom restoration act", in a brazen attempt to protect our state's homophobic businesses from having to serve gay couples. many states are or were trying to do the same this year, but we were the first and for that we have earned the nation's scorn. as far as anyone is concerned, indiana is officially bigot central.
perhaps nobody is more angry about this than the state's republican bloggers. but they're not angry at the (overwhelmingly republican) legislature for passing the bill, or at our governor (also republican). no, they're mad at liberals, who they insist are mischaracterizing the bill as being bigoted when it's really about freedom and patriotism and puppy dogs. gary welsh is so worked up about this that he concludes his latest post thusly:
It's no wonder we now live in a country where an element of the government can assassinate a president, civil rights leaders and other world leaders with impunity and carry out false flag events and propaganda campaigns against its own people and have the media castigate the discerning citizens among us as crackpot conspiracy theorists. Creating false realities is now the modus operandi.governor pence and legislators who voted for the bill have a similar message (except for the assassinations and false flag propaganda part). "read the bill!" the governor begs. this ain't ragu and that ain't in there. likewise, on his tweetle, bill-sponsor scott schneider has been retwittling comments like this:
"RFRA legalizes discrimination" is a false narrative gone viral. The seriousness of the charge matters more than the nature of the evidence.
— Pete Miller (@Sen_PeteMiller) March 28, 2015
so where did all we evil, duplicitous liberals get the idea that this bill was intended to legalize discrimination against gays? maybe we got the idea from scott schneider!On the other side, conservative groups with deep ties to many Indiana churches are lobbying hard. One such group, Advance America, is making a fact sheet available to churches.(emphasis mine. SB 568 was a different version of the bill that was dropped in favor of SB 101. schneider was the author of SB 568, so he presumably had a good idea what his bill was intended to do.)
"SB 568 will help protect individuals, Christian businesses and churches from those supporting homosexual marriages," it says. "Christian bakers, florists and photographers should not be punished for refusing to participate in a homosexual marriage!"
When asked if the pending legislation would afford such protections, Schneider said it would.
and what about advance america? they've been talking about this since at least january:
Senate Bill 568 is the Religious Freedom Restoration Act. Senator Scott Schneider is the author of SB 568. Co-authors include the following Senators: Dennis Kruse, Brent Steele, Carlin Yoder, Jim Buck, Amanda Banks, Liz Brown, Jim Smith, Jim Tomes and Greg Walker.okay, but who are advance america anyway? they're a lobbying organization headed by a man named eric miller. this eric miller:
SB 568 will help protect religious freedom in Indiana by providing protection for individuals with sincerely held religious beliefs, along with Christian businesses and churches.
SB 568 will help protect individuals, Christian businesses and churches from those supporting homosexual marriages and those supporting government recognition and approval of gender identity (male cross-dressers).
Here are just 3 examples:
- Christian bakers, florists and photographers should not be punished for refusing to participate in a homosexual marriage!
- A Christian business should not be punished for refusing to allow a man to use the women’s restroom!
- A church should not be punished because they refuse to let the church be used for a homosexual wedding!
so sorry, anyone who tries to tell you that this is all some smear campaign thought up by democrat operatives is being disingenuous. we know for a fact that this is about discrimination because the bill's supporters and sponsors told us so... until word got out, that is. now most of them have suddenly gone silent. (a few of them are still brave enough to write op-eds whining about the gay mafia or call in to radio shows to argue in favor of discrimination, though.)
so maybe law professor david conkle is right that the bill doesn't really legalize discrimination and that any attempts to argue such in court would eventually lose on appeal. (personally i don't trust the supreme court to rule correctly on anything anymore.) but by ignoring the political context, these sorts of legal analysis miss the point. even if the RFRA doesn't actually legalize discrimination, it was supposed to.¶
Tuesday, October 21, 2014
databending and glitch art primer part 3: the GIF
GIF, as seemingly everyone on the internet knows, is an image format that has become synonymous with the fact that it supports animation (even though it wasn't originally intended to). it's extremely popular and in recent years has become popular among glitch artists as well.
i run a tumblr blog called glitchgifs, where i'm regularly asked some variation of the question "how do i make glitch gifs?" my usual answer is that there are three basic ways:
- glitch a still image several times, then animate it.
- glitch a video, then make gifs from that.
- glitch a gif file—the most difficult because the file will likely break and then you'll need to use a program like irfanview to retrieve the damaged frames.
it's notable that the color table is usually stored in the gif file itself. that means that we can glitch it, if we're careful. just take a gif and change the data in the table (and only that data):
you have to be pretty precise to do this without breaking it—the global color table (when present) starts at byte 14
transparency
another classic feature of GIF is support for transparency, which is handled by defining one of the colors in the table as transparent. but this can go wrong: google+ used to have a glitch in its gif uploader that confused transparent pixels with solid black ones, and vice versa. this created bizarre ghosting artifacts, as it would just lay the frames on top of each other, with some bits invisible so you could see the frames beneath:
g+ has since been fixed but you can create similar effects using tools like klear.me:
if you're super handy with a hex editor, you can even play with transparency there by manipulating the graphic control extension block. when present, this block will be eight bytes long, with the first three bytes being 21 F9 04 and the eighth byte always being 00. if present at all, there will be one GCE block for each frame in the animation.
again: if it's used at all, there will be one such block at the beginning of each frame... meaning you could even use different settings for each frame! more detailed information here.
dithering
early computer graphic designers using limited color palettes often had to use tricks to create the illusion of color depth. GIF uses a trick called dithering—simulating colors using randomly- or algorithmically-produced patterns of dots. with dithering and a well-chosen color table, it's possible to create gifs with almost-photorealistic colors.
each individual dither is just one pixel. that can be awfully small on today's screens, so to really play with dithering, you may want to enlarge them, like in daniel temkin's dither studies. to enlarge an image and get that "big pixel" look that i love so much, the setting is usually called something like nearest neighbor or preserve edges/crisp edges. many web browsers now support this as well, which means you can load up a gif in a web app like my HTML5 image filter, crank up the size slider, and watch the pixels dance.
(ironically, this feature works beautifully in browsers like firefox, even though the actual CSS filters themselves don't work in that browser, whereas the filters work in chrome, but chrome doesn't currently support "crisp edge" resizing!)
when upsizing your pixels in this fashion, the usual advice is to always go in powers of 2—200%, 400%, 800%, 1600%, etc. this will ensure that you get the crispest edges possible. but hey, maybe you want your edges to be a little messy...
more fun with color tables
if it's possible to get almost-photolike colors in a gif with the right color table, then from a glitch artist's perspective, we might be more interested in going the other way—deliberately using the "wrong" color tables to accentuate the dithering. for example, the "bitcrushed" look used by artists like jonCates involves extremely small color tables: as small as 2-4 colors.
i've taken a different approach with my color tables series. a year or so ago i was using photoshop's "save for web" dialog, preparing to save an image, when something about the color table caught my eye. the colors, the composition of how they were arranged (sorted by luminance)... these were beautiful and i was compelled to save it and take a screenshot. this became glitch color table #1.
so i started collecting color tables and posting them on tumblr. i've collected and published a few dozen now, many of them derived from glitched or bent source images. but these color tables aren't just pretty pictures—they're also tools for creating other artworks. by deliberately applying a color table that has few colors in common with the source material, we can get some unusual effects, as the software is forced to choose the "best" of many bad options. glitch color table #1 has no green in it, so watch how it deals with grass:
of course, you don't have to start a color table collection. you can load color tables directly from another gif, or use a palette editor program to design or edit your own dream color table. and though you're welcome to download and use mine, there are probably bunches more color tables floating around online. want to use the color palette from the original nintendo NES or gameboy? get the color tables here!
i've been using this trick a lot lately, such as in my dither sunsets series and my latest video. i start out by shrinking the source image/video at the beginning, which allows me to enlarge it back later once the dithering has been added. then i try it out with different color tables, and when i find a result i like, i enlarge it again. i can even animate them by exporting several different versions with slightly different dither settings, and then stringing them together into a gif:
so there you have it: GIF is far more than just an export format for silent video loops. it is a unique format to be mastered, with its own world of artifacts waiting to be explored.¶
Wednesday, September 11, 2013
obligatory six-month update
hello, little blog! how have you been? things have been pretty good for me... well, except for the one incident...
back in july, virago & i went to milwaukee to see four legends of midwest breakcore: stunt rock, abelcain, doormouse, and anonymous. (doormouse, you may recall, headlined the after-party at our wedding.)
the show was great, with three of the performers effectively coming out of retirement for the show. the music was great, we got to chat and catch up with doormouse and stunt rock, and made some new friends. and we did other fun milwaukee stuff like dining out (milwaukee loves friday fish fries and something called "pulled ham", which is like pulled pork, except it's ham), record shopping, and the obligatory brewery tour.
then on the way home, we were cruising the chicago freeway when another driver "fell asleep" and crashed into my rear bumper at full speed. (i don't know how you fall asleep on the freeway at 3 in the afternoon without drugs, alcohol, or a medical condition, but that was her story.) we were then pushed down the freeway an unknown distance, hit the curb, and spun around 360 degrees, ending up in the left lane with a broken front axle.
somehow, despite the fact that the chicago freeway is pretty busy on a weekday mid-afternoon, we didn't hit the median or any other vehicles. we could easily have been killed, but escaped with only minor injuries (virago had some back pain for a few days, but that was it). but of course my car was totaled, and the six-pack of new glarus beer i had picked up to bring home was in the trunk right at the point of impact, sending beer and broken glass all over the trunk, and damaging a few of the records i'd brought with me for trade.
so that sucked, but at the same time it became an opportunity to get a newer car. after getting our insurance check, we headed out to terry lee honda (chosen because it was the best-reviewed honda dealer in the metro area, and after going there it's clear why) and now we have a 2011 civic—the same model as my previous car, only 10 years newer, in black, and a touch more blinged out.
so, near death experience aside, things have been good. i've been keeping busy. i finished a new release called taco meat, coming hopefully soon on a german label called betonblume. it's a bit glitchy, with some wack cylinders-style sampling but this time with beats—with actual drum programming (and not just sequencing percussion sounds sampled from somewhere else). i'm really pleased with it.
i've been making tons of art as well, and getting work in art shows. this summer i was in a show called run, computer, run (show is over but you can still view my piece on the website). i also have work in a show called _ģ̶Ł̶1̶ɫ̶C̶ʮ̶_Δ┌┼---\/\/\/\/\/\/!┬---jonCates_(AKA "Glitch Art with jonCates"), which opens tomorrow in saskatchewan as well as online at gl1tch-4rt.tumblr.com. then later this month i'll have a piece in a show called money as error. and i'm currently working on something pretty cool for the wrong - new digital art biennale, which opens november 1. all that, and i post new work daily at stallio.tumblr.com, and a couple other things in the works i probably shouldn't mention yet. and did i mention i'm still doing my weekly net radio show Active Listening / The Act of Listening on numbers.fm?
so yeah, i've been productive. stay tuned for future updates (though following me on facebook or tumblr will probably yield better results than relying solely on this blog). ¶
Tuesday, March 12, 2013
just how bad is soundcloud's "automatic content protection system"?
as many of you know, one of my music processes is is a form of sonification (or audification) where i trick my computer into opening various data files as if they were sound files, and then i make music out of the resulting sounds. (i wrote a tutorial about it here.)
a while back i posted an old song called "denial of service" to soundcloud because i was thinking about including it on my recently-released album on the DLL. the song is what you might call "pure" data sound, in that every sound in the song is made of this sonified data. so imagine my surprise when i got an email from soundcloud that they'd taken the song down because they thought i had sampled some house song:
i repeat: every sound in my song is taken from sonified data. no drum machines, drum samples, or any other instruments were used. but somehow my song still triggered an automatic takedown for uncleared sampling. i didn't even run any audio effects on the samples—they are all clean.
want to hear for yourself? here is my song (warning: fairly abrasive). and here is the song they think i sampled (warning: fairly mediocre). no human who listened to these two recordings would think they had anything in common.
as a glitch artist/musician, i find this fascinating. what could this algorithm be hearing in my song to make it think i sampled some house track? in terms of tone, timbre, tempo, and meter, these two recordings could hardly be more dissimilar. but to a bot, they apparently sound alike. somewhere in there, indiscernible to mere human hearing, the two must have some tonal sweep or polyrhythm in common. or some checksum came up with the same result by chance. it's hard to even speculate about how this may have happened without knowing more about how their bot works.
but it's also frustrating that my song has been pulled down based on such a laughably false accusation. and although i'm certain i will win the dispute, it's annoying to have to send soundcloud my name, address, and phone number, as well as tick seven checkboxes threatening to sue my ass off if i'm lying:
of course, there's no way for me to take soundcloud to court for wasting my time or for issuing bogus threats. all this because of a poorly programmed bot. in a way i'm lucky that my song obviously doesn't contain any "musical" samples of any sort. what would happen if i had made some housey track that just happened to use the same drum hits, or just sounded similar?
update: within a couple hours of filing a dispute, i received the following message:
thank you for providing feedback in regards of the upload:
stAllio! - denial of service
This notification is to inform you that your upload has been released to your account.
Thanks,
The SoundCloud team
so although it's reassuring that these disputes are reviewed quickly, it's alternately fascinating and horrifying that such a thing could happen in the first place. and i must wonder what would've happened if my case hadn't been so open-and-shut. ¶