Tuesday, February 20, 2018

Loudly Organized | A DIY Tool Roll

There's just something professional about busting out a tool roll. I mean, show up with your surgical instruments haphazardly thrown into a bag, and there's little chance you'll inspire confidence. But unroll a neatly organized set of instruments, and the soldiers will practically line up for your to perform surgery on them. So yeah, I've always had a healthy appreciation for tool rolls and the like (and yes, bonus points if the kit fits in your pocket).

I don't technically need a tool roll for my job; not because I don't need tools, but because I've already got them nicely organized. However, I was looking for another easy, yet practical sewing project to cut my teeth on and making a tool roll was a natural choice.

I worked out my creation as I went: measuring, pinning, fitting the items in place and then repeating this process a couple more times.

The finished product came out surprisingly clean looking:

I punted on any sort of closure mechanism, opting for a rubber band. Though I may come back to this and see what I can come up with.

Next time I meet a client to talk about their idea, boy are they going to be surprised when I bust this bad boy out. Just like that Civil War surgeon, I shall inspire confidence through my meticulous set of instruments ready to tackle whatever gruesome task I throw at them.

Thursday, February 15, 2018

A Kosher Conundrum

If you keep Kosher, these three pictures are remarkably confusing:

For those not in the know, the outer box shows that the cookies are OU Parve. That is, the cookies contain no dairy products. The outer box also shows that the packets will have OU Parve printed on them. But the inner packets themselves, which have no ingredients on them, are marked as OU D. Where the D stands for dairy.

So which is? Are the cookies parve or dairy? Can I eat them after a burger or not?

Luckily, the good people at the OU Kosher Hotline were there to help:

Subject: Re: Giant Cookies Mystery

They are currently parave but company is transitioning to dairy

So there you have it, despite the fact that the packets are labeled dairy, the cookies are actually parve.

Oy, it pains me to think that these cookies are going to be transitioning to diary status. No word yet from the OU as to whether they are going diary because of a recipe change, or for other reasons.

Wednesday, February 14, 2018

Pick Me! Adventures in improvised lock picking.

Every so often I pick up my copy of How To Open Locks With Improvised Tools: Practical, Non-Destructive Ways Of Getting Back Into Just About Everything When You Lose Your Keys and get re-inspired to master experiment with lock picking. If you've never considered lock picking, it probably sounds quite devious, though it need not be.

With that said, the Commonwealth of Virginia doesn't take kindly to this hobby and considers just owning a set of lock picks as intent to break the law. All isn't lost though, as the point of the book is to use improvised tools.

So today I grabbed an old padlock and a bunch of possible materials to turn into lock picking tools and went to work.

15 minutes of crafting and fiddling later (which felt like an eternity!) I shocked myself by opening the lock:

This act falls squarely in the beginner's luck category. Though, when it comes to defeating locks, I'll take any success I can get.

As you can imagine, there are lots of resources on the web to help you learn this skill. And of course, YouTube is your friend. Happy picking!

Tuesday, February 13, 2018

A Desktop in the Cloud - Experimenting with Amazon WorkSpaces

Check out these pictures of two different computers in my house:

Ignoring the clutter, what you're looking at is two different snapshots of the same Windows 10 Desktop. What's remarkable about this is where the desktop is actually running: why in the cloud, of course.

Virtual servers completely changed the software development and small business game. Gone are the days of buying, configuring and maintaining physical servers. Instead, you can virtual turn them on and off at will. Curious if having twice the RAM will make your server run 10 times faster? Kick off, and ultimately throw away, a virtual server to give it a try. Need to launch multiple instances of a server? Don't bother hand configuring them, just create an image and launch as many instances as you want.

It's time for me to phase out one of my regularly used computers, and pick up a new one. And while shopping around it occurred to me that surely there must be a virtual desktop solutions like there are for servers. And of course there is, and of course Amazon AWS offers this service and of course there's a free tier to try it out. So that's what I did.

Launching a server is trivial, and so is getting access to it. I had no problem installing Cygwin and the Gimp on it.

The pics above show me running my virtual desktop instance on both my standard Windows, dual monitor environment, as well as a Chromebit Chrome OS stick. For the quick tests I ran, both performed well. As you can tell, the virtual desktop supports dual monitors, which is key. It also seamlessly handled audio in a YouTube clip.

I see that Amazon Workspaces supports taking image snapshots. With a bit of scripting, I'm confident I could trivially setup a weekly backup procedure that insured I always had access to working desktop instance.

The big question, of course, is lag. I'm writing this post on the virtual desktop and I'm not noticing any annoying lag. Though writing a blog post is hardly a way to push a computer. It's also not fair, because if I did go with a virtual desktop I wouldn't use their free 4 Gig tier, but would opt for something far more powerful. I'm fortunate to have a direct Ethernet connection to my FIOS router, which gives me solid network speeds. I'm sure this is helping in the lag department.

And speaking of network speeds, the virtual desktop has almost comically fast web access:

Even if the lag doesn't kill me, I'm sure there will be other limitations that will keep me from being able to use a virtual desktop exclusively. For example, will an AWS WorkSpaces instance grant me USB debug access to an Android device? That's probably a bridge too far. Still, a virtual desktop could be a hugely powerful tool. Especially in an environment where I don't have an IT department I can turn to, to fix whatever random issue is happening on my computer that day. AWS let me tame my server environment, man it would be great if I could do the same with the desktop experience.

Monday, February 12, 2018

A Cloud Settles over DC and a Mysterious Orange Goo

That's not a metaphor for the current administration. That's just a fact. Yesterday it got up to nearly 70°F and we had a morning full of rain. This all made for a surreal run through DC and the chance to grab some unique pics of the area.

You would think the orange gelatinous goo growing on the side of one of the trees near the Tidal Basin would be easy to identify. But alas, all my attempts to get Google to cough up an identity have failed. Any ideas what it is?

Friday, February 09, 2018

Needs More Grommets | Adventures in sewing a prototype

After I finished sewing my first solo creation, I was left with a question: how do a I add a shoulder strap to the (very simple) haversack I just made? I ended up adding grommets to the corners and using cheap carabiners to attach the strap to these endpoints. While the bag was comically funny looking, it was functional.

This got me wondering: what if I created a larger bag and sprinkled grommets at the corners liberally? I'd then be able to re-rig the bag to carry it vertically, horizontally, or dispense with the strap altogether and just attach the bag to a bike rack or other carrier. In my mind's eye this seemed like the ultimate in flexibility.

But I need not settle for imaging this. I had plenty of von Trapp fabric left, as well as a package of grommets. Why not create a prototype of what I had in mind and evaluate the idea in a more concrete way?

I essentially followed the same pattern described in the Ripstop by the Roll's belt bag tutorial, except I opted to make the bag much larger. Because this was a prototype, I skipped installing a zipper altogether. For dimensions, I went with a 7" wide, 5" deep and 10" tall bag.

You can see in the pics below how I went about constructing the bag. First, I figured out all the calculations on a sheet of graph paper (so not to scale!). Then I carefully cut and marked the fabric. Finally, I sewed the 8 seams to make the fabric into a bag:

And here's what the finished product looks like. You can see me demonstrating a few different attachment points:

So many lessons learned! Among others:

  1. I carefully cut the fabric to 30" and moments later realized I was supposed to cut it to 30½" to provide a seam allowance. D'oh! What's that saying about how often to measure, and how often to cut?
  2. The bag came out larger than needed. Having a prototype really makes that obvious.
  3. Even though the bag is 5" wide, it's crammed to access. I believe the fix for this would be to put the zipper on the long side of the bag. In a traditional bag, this changing from a top to side access zipper. But the whole point of this bag is that it can be carried either horizontally or vertically, so this doesn't really matter.
  4. I carefully placed and installed the grommets. And then most of them fell out while fiddling with the finished product. I'm not sure if it's my installation skills, the wrong choice of fabric or the wrong type of grommet for the task. But I know that before I try again, I'll be picking up a variety of grommets and doing test installations on different fabrics.

Even with all these lessons learned, the project was still a success. I had a chance to work on the fundamentals of measuring and using the sewing machine, and managed to make a creation in my head come to life. As for the grommet based attachment approach, the jury is still out on that. I'll have more hope for this design once I show that the grommets can be truly durable.

For now, REI need not worry that I'm going to put them out of business. But man, this sure is empowering and fun!

Thursday, February 08, 2018

Changing the World, One Minecraft Server at a time

I'm a big fan of mindfully using technology to make our lives better. Sure, zoning out to a movie or video game is fun and has its place. But I see huge potential for a more active approach to tech. Combine this with the fact that I'm in the middle of reading To Siri with Love, a parenthood story of a Mom with an autistic child, and you can appreciate why this TED Talk was such a winner.

The talk, How I use Minecraft to help kids with autism, is a straightforward one. An autistic dad, created a virtual space for autistic kids to play, and the results were wonderful.

It's truly a story of using technology to accomplish something profound.

It also underscores that the tech doesn't need to be exotic or cutting edge. The tools are already out there, we just need to put them to use.

Maybe it's time to learn Minecraft?

Wednesday, February 07, 2018

Let's Make Music, Version 2

Yesterday, I described three steps I took in the pursuit of generating better sounding music. Today I took yet another step: I implemented an alternative API for music generation. While the underlying functionality is still powered by Web Audio API oscillators, how I interact with those oscillators has changed significantly.

Here's a few guiding principles of the new system:

  • My audio generator continues to take in, and return a state context. This remains consistent with the visual creation language I described previously.
  • On this state context are a number of critical values: bpm, width and synths. bpm, as the name suggests, is the beats per minute of the audio being created. The audio generation system now works strictly in beats, rather than absolute time. width corresponds to how many beats the music generator is expected to account for. synths is an array of Synth objects which generate musical tones. The values of bpm and width are set to sane values, but the music generator can change these at will.
  • After width number of beats, the music generator is called again and expected to return a new set of Synth objects ready to produce music.
  • A Synth is an abstraction of an Oscillator. To simplify matters, it has two controls: frequency and gain.
  • By default, a Synth's frequency and gain are set to 0. To set either frequency or gain, you must provide a target value, a position in beats when the value becomes active and a duration in beats that the value should remain active.

OK, enough talk. Let's see some code:

Audio.setup(function(ctx) {
  var scale = [Note.C, Note.D, Note.E, Note.F, Note.G, Note.A, Note.B, Note.C ];
  ctx.width = scale.length;

  var adam = new Synth().gain(.5, 0, ctx.width);

  scale.forEach(function(n, i) {
    adam.f({ value: n, fadeIn: 0.01, fadeOut: .1 },  i, .5);
  });

  var brenda = new Synth().f(Note.F, 0, ctx.width);
  for(var i = 0; i < ctx.width; i++) {
    brenda.gain((i / ctx.width) * .8, i, .5 );
  }

  var charlie = new Synth().f(Note.octave(Note.C, 3), 0, ctx.width);
  for(var i = 0; i < ctx.width; i += 2) {
    charlie.gain({ value: .2, fadeIn: .01, fadeOut: .001 }, i, .25);
    charlie.gain({ value: .2, fadeIn: .01, fadeOut: .001 }, i + .5, .25);
  }

  ctx.synths = [ adam, brenda, charlie ];

  return ctx;
});

For lack of a better convention, I used people names for the synthesizer objects above. You can see two common patterns. First, you set the gain as constant and tweak the frequency:

var adam = new Synth().gain(.5, 0, ctx.width);

This sets up adam to play at half volume for the current iteration. There's no frequency set, so this Synth isn't actually generating any music. When I say:

adam.f({value: n, fadeIn: 0.01, fadeOut: .1 }, i, .5)

I'm setting the frequency to n at beat i for half a beat. The values of fadeIn and fadeOut allow me to gracefully ramp up to, and out of the frequency. I learned the hard way, that without using an envelope of some kind, the tone is almost always ear splitting.

The other pattern is to set the frequency as constant, and change the gain on the fly. Consider brenda:

var brenda = new Synth().f(Note.F, 0, ctx.width);

brenda is configured to play an F note. However, with the gain at 0, no sound is generated. To create a series of half notes, I raise the gain appropriately:

for(var i = 0; i < ctx.width; i++) {
  brenda.gain((i / ctx.width) * .8, i, .5 );
}

This code is raising the gain a larger amount for every half note generated.

Give this code a listen:

Is this music? I supposed. Certainly after a couple of iterations it will make your head hurt. But it has too much repetition to be noise. Let's call it aurally interesting.

Here are some other examples:

I think it's noteworthy how the change in music API has vastly influenced the music generated. This is one of the joys of programming: we can invent, with relative ease, new metaphors for solving problems. And just by changing the metaphor, you can arrive at new solutions. I suppose this is the virtual version of deciding you can't make music with a piano, so you go out and buy a drum set.

The bottom line: I'm enjoying my new toy and thankfully you aren't being forced to hear me practice.

Tuesday, February 06, 2018

Still Mostly Noise - Improvements in my music generation toolset

I continue to try to wrap my head around composing little chunks of interesting sounding music. While I still haven't cracked the puzzle, I've made some important progress.

First, I brushed up on music theory with this TED talk: Transforming Noise Into Music | Jackson Jhin | TEDxUND. It's exactly the topic I'm exploring, as I strive to create audibly interesting snippets. If you've ever wondered what makes music, music, you'll enjoy this 10 minute talk.

Next, I refactored my code to allow for standard note generation with ease. So rather than saying:

 new Sound().frequency(261.626)

I can say:

  new Sound().f(Note.C);

Working with standard notes helps increase my odds of avoiding ear splitting frequencies.

The biggest improvement to my system came when I did a Google search to explain why I was hearing a clicking noise after most notes. The answer is explained here: Web Audio, the ugly click and the human ear. The clicking comes from halting the oscillator mid sound wave. A much cleaner way to handle stopping an oscillator is to gracefully lower the volume (gain) to 0. In my system, I'm already using a gainNode to control the volume of the note. So rather calling stop() on the oscillator, I tried this:

oscillatorNode.start(t);
gainNode.gain.exponentialRampToValueAtTime(0.0001, t + duration + 0.03);
oscillatorNode.stop(t + duration + 3);

At t + duration + 'a fudge factor' I take the volume of the oscillator down to near 0. And the click went away! Whoo! You can read the full details of this here.

Doing more research on this, I came across Chris Lowis' Synthesis with the Web Audio API - Envelopes blog post. This article explains that synthesizers frequently use a strategy like the one above to control not just how a note finishes (decays), but also how it starts (the so called attack). And this makes sense, when you a strum a guitar string, it doesn't start off at full volume, it works up to this, and then fades off. I updated my code to implement this behavior as so:

oscillatorNode.start(t);
gainNode.gain.exponentialRampToValueAtTime(gainNode.gain.value, t + Math.min(.001, duration / 32));
gainNode.gain.exponentialRampToValueAtTime(0.0001, t + duration + 0.03);
oscillatorNode.stop(t + duration + 3);

The result is that I'm ramping both up to, and down from, the max gain value. It's remarkable how large an impact this one changes has on my musical snippets. Instead of blasting ear splitting tones, I'm now generating sounds that have an almost organic, mallet'y feel to them. I'm not sure this is ideal, but it's far easier on the ears than a pure tone.

Currently, I've hard coded both the ramp up and ramp down to values. However, I'm thinking that this may be so essential that it may make sense to re-work my Sound API to give control over the this behavior. In fact, I'm wondering if my whole Sound / Score / Stack model is holding me back, rather helping me. My current thinking is that my API should expose oscillators directly, rather than try to abstract them away.

Here are some examples of my work, and as always, you can find the source code on github.

Thursday, February 01, 2018

Flower Power! An unplanned first solo sewing project

At the end of last year, with much assistance from Mom, I finished my first sewing creation. Today I hit another milestone: my first solo project. I started off with modest goals: to see if I could setup and properly thread the sewing machine my Mom gave me. Using the well worn manual as a guide, I managed to pull this off. There's so many nooks and cranny on this machine, it's a wonder I got this far.

I carefully positioned some scrap fabric, just like Mom had shown me, and made a line of stitches. It worked!

Juiced up on my own success, I searched my memory for a quick project to tackle. This haversack was the first thing that came to mind. As for fabric, I went with re-purposing a fatally stained table cloth. I figured the upcycled material would cushion any disappoint when this whole experiment went wrong.

I cut out a rectangular strip of fabric, folded it in to position and carefully pinned everything in place. And then remembered, oh crap!, you have sew the project inside out to have the finished side showing. After re-pinning the fabric, I ended up with this:

The top fold makes for the main pocket, while the smaller fold on the bottom, is a smaller pocket on the closing flap. For a better view of what I was going for, check out this video.

I carefully sewed the edges together, and to my great surprise, I had a bag that looked very much like what it was supposed to! Next, I needed to figure out a strap. For that, I busted out some metal grommets I had picked up last year. It took a few attempts to figure out how to install them, and of course, more care has to be taken to install the finished edges in the right position. The finishing touch was the discovery of some random cheapo carabiners I had lying around that fit in the grommets perfectly.

I cut a strip of 1" webbing and attached it to the carabiners. My first solo made creation was officially complete!

Technically, I should pose with the bag to truly show its scale and finish. Yet, I don't think I can quite pull off that look. Still, I'm amazed that what started as throw-away experiment, turned into a technically functional item.

Look out beginner level sewing projects, here I come!

LinkWithin

Related Posts with Thumbnails