Tuesday, September 25, 2012

Big Muff Tone Stack analyshenanigans.

So, I did a few crude experiments and have a few problems, but they've gotten me thinking about how difficult it to manage impedance-related losses in passive circuitry. Here is a more technical diagram of what I'm actually doing.
  bigmuff-atten-blockdiagram  

This is just a diagram of models. Basically I know that if a circuit fits a model, and the models work together a certain way, then I know that the circuits work together that same way. Every wire you see Zout in one stage, and Zin in the next stage, attenuation is occuring, and this time its unwanted. For a "perfect" transmission of voltage, Zout must be zero and Zin must be infinity. The problems with these impedance is that they change when you twiddle the knobs. If it was predictable it wouldn't be a big deal, but there are some variable resistors that have to be taken into account, so instead of saying Zin is a, we have to say Zin varies from b to c. It might take differentiation to find the min or max, depending on how you do it. Here's the schematic for the version of the tone stack I'm using:
  bigmuffstack
To find Zin, we just see what the equivalent resistance to ground of the whole thing is, assuming no load. To keep life simple, we're going to just do a DC analysis, and assume that capacitors are open circuits.
  bigmuffstack2 
There's only one path for current to go through, so the equivalent input impedance is trivial to find: just add up the three resistors. To find Zout, you see what the equivalent resistance going in BACKWARDS from the load is, assuming that the source is grounded. For this circuit, this means two branches which are effectively in parallel, and each one of them contains half of a potentiometer. bigmuffstack3 To really analyze this, we're going to have to split up the potentiometer. Let's call one half R and the other half (1M-R), since they have to equal 1M. So this means that the two parallel branches consist of R + 39k and (1M-R) + 8.8k. The formula for parallel resistance tells us that in terms of R, Zout is (R+39k)*(1008.8k-R)/1047.8k, a quadratic. It's easy to see that when R is 1M, Zout is approximately 8.8k, and when it's 0, Zout is approximately 39k, but when R is 484.9k, about halfway, Zout becomes its maximum amount: 261.95k. So there you have it. When I design the attenuator, it must be able to deal with this large change in output impedance by having an input impedance much large enough to be considered equally "larger" to both values. When I tested the circuit I plugged it directly into the 22k impedance effect return, and the result was that in the middle of the knob barely any sound came out, and it was crazy loud at the outside. Looking at the numbers, this is the result one would expect! More on attenuator design coming soon.

Monday, September 17, 2012

Getting the rig together--FX loop tube

So, I actually have a growing need for a working and/or more permanent guitar rig. For recording I've been able to hack things together as a kind of one-off, but most of the tones I got were things that I wouldn't be able to easily reproduce again, especially live, with the equipment I have now.

Anyway, one part of this is due to the fact that I rely on a (cheap) mic tube pre-amp to make my (cheap) solid-state combo amp sounds like an (expensive) tube guitar amp.


The problem with this is that to get the nice tone coloration out of a tube, you have to drive it hot, and it ends up being driven so hot that the signal level would be unsafe. So I just keep the volume as low as possible. I just nudge it up from zero until it sounds at all--and that's still usually too loud. I feel like if I turned it up any higher than that I'd blow my power amp or speaker for sure.


The combo I'm using is a Peavey Transtube Studio Pro 112, and the mic pre is an ART Tube MP Studio. Based on the specs, the amp nominally sends and receives -10dBV through the effect loop. The Tube MP has a maximum gain of 44dB, and a maximum output of about 20dBV. While it looks like I'd need a 30dB attenuator, I'd rather it be adjustable, so I'll probably end up testing several levels before committing to one.
Unlike a guitar amp preamp, the Tube MP also lacks any tone controls. I've been wanting to implement an idea for a new passive tone stack anyway, so I've decided to use it here. It consists of two Big Muff tone stacks, each with flat mids, but who have different cutoff frequencies. This would allow a wide range of mid cut and mid boost options in addition to regular Big Muff tone operation.

Both the attenuator and tone controls can be 100% passive, and since they're intended for the same device, I'm going to consider them the same project and put them in the same box, which with the ART TubeMP I'll hopefully be able to velcro somewhere on my amp.

Here's a diagram of how it would be.

rig Without the FX loop, the signal goes straight from the internal preamp to the power amp.

Next post I'll record a video of what it sounds like without the attenuator and tone stack (although I think I've done that before, but without really talking about it), and show what would have to hook up to what.

Tuesday, February 28, 2012

Guitar Action Adjustments

I've been doing a lot of guitar tech work on my various instruments lately. Let me tell you a little bit about guitar string action.

I used my new Dremel rotary tool to carve a replacement nut for my acoustic bass guitar, but I'm having trouble completing the setup process.

I corrected the neck curvature to 0.012", which made a huge difference, but it doesn't seem to be enough.

Here is a diagram showing the three adjustments that affect string action--the amount one must press down to fret a note--on a guitar.

guitar-adjustments

Basically if the action is too high, the intonation will be (more) sharp because your fingers will have to push so far that they actually change the tension in the string. In addition the player's fretting hand will hurt. (More.) And if the action is too low, then the string won't have enough room to vibrate--when it vibrates it will hit the next fret up, causing a buzzing sound, which is usually unwanted.

Nuts are slotted, and the action is set by filing the slot deeper--you can only reduce it. On an acoustic, the bridge is a single piece of plastic as well, that must be sanded to the right height. You set the nut and bridge heights for each string separately. But if you file them too low, you can raise it by cramming shims of wood (or sometimes razor blades) underneath--but this possibly slightly changes the sustain and tone of the guitar. Also, shimming raises the height for all of the strings, not just the one you're working on.

Anyway, 0.012" still seems to be too high. I sanded down the bridge until the strings started buzzing, but the action is still actually way too high, in terms of feel and intonation. So I guess the curvature is still the problem, even though the general recommended measurement is anywhere from 0.012" to 0.002".

Another problem with adjusting the bridge on this particular guitar is that it has a piezo pickup in it, which consists of two thin sheets of metal with four little ceramic blocks between them, and the bottom of the bridge is funny shaped so that the blocks fit between them.

Basically what I'm saying is that shimming is out of the question, as is buying a slab of plastic and carving the bridge from scratch myself.

The curvature is adjusted by manipulating a sort of tension rod that goes down the inside of the neck, called a truss rod. I'm a little nervous about tightening it any more than have already because it's kind of an adjustment that you don't want to have to mess with much, because if you break it you've basically ruined the neck, possibly "totaled" the guitar. But I guess it's what I have to do. If I get this right then the acoustic bass will hopefully cease to be the least favorite instrument I own.

Saturday, July 30, 2011

Book Review: Suite Scarlett by Maureen Johnson

I feel like my doing a meaningful reading of certain types of books grows in complexity inversely with the complexity of the prose. I mean when I read dense, rambling, stream-of-consciousness postmodern stuff I never really have any trouble figuring out exactly what I did and didn't like about a book. But when it's young adult literature, my feelings are more complicated. Reading Suite Scarlett let me explore these feelings and get them on paper; honestly, this is an achievement in itself for which Johnson should be applauded.

This is kind of the same way I feel about a lot of books. It doesn't have to be a perfect novel to make me think. And a hypothetical perfect novel might not even help me express myself the same way that this book is. So I guess what that might mean is that sometimes "good" is better than "perfect".

Modern Literature Reminds Me of Jazz Music


What it comes down to, for this book, is that it's a member of several different traditions, some just in modern literature, and others that have existed since the novel was first being developed. And a book like this gains merit for partaking in these traditions, even if that means that someone ignorant of them would dislike it.

The best analogy I can think of is a well-constructed bebop solo. Jazz established itself as a new "musical language" with its own unique licks and phrases. More than any other quality that defines it, these phrases are jazz. It doesn't matter if you swing your rhythms and play over a lot of ii-V-I progressions, if you don't use these phrases, you still aren't playing jazz. This is taken to the next level with the sub-genre bebop, where an entire solo might consist of absolutely nothing but exact quotations from other songs, rearranged and juxtaposed intelligently in a way such that it makes sense, or at least makes a statement.

So, in theory, a music critic that has listened to and analyzed every piece of classical music from 1600-1920 or so, but who had never heard any other music at all, could listen to the most incredible bebop solo and not only find it poorly-written, but bizarre and confusing. Even meaningless. This hypothesis is absurd, but it still makes a valid point--you can't listen to jazz in a vacuum. And you also can't read in a vacuum. So the rest of this review is going to be about how Maureen Johnson celebrates (intentionally or not) a great diversity of other literature in Suite Scarlett.

The Great Expectations I Bring to Young Adult Literature

[Not those Great Expectations. Wait ... yes, those Great Expectations.]

I don't read much YA, especially since growing out of its supposed intended age range, but this has been changing due to its prevalence among book bloggers. Much of the YA books that I have read are fantasy, but many of those might be better categorized as children's fantasy anyway. In my experience, YA fantasy novels tend to combine the tropes and themes of fantasy with the form of YA literature, rather than the other way around. So the expectation that I brought to this book is that I'd be familiar enough with its form, but less so with its tropes and themes. But this is all just guessing. The point is to let you know what kind of expectations I'm talking about, and how my first reading of Suite Scarlett compared to them.

A lot of people out there think that genre doesn't imply style--that is that YA literature is exactly like adult literature and that there are no meaningful distinctions between them besides the intended age range. I think that this is kind of silly, and misses the point. Think about what I said about jazz music. I think that while the age range is what originally defined YA literature, the genre has taken on a life of its own and established a set of traditions that define YA more usefully than the intended age range alone.

That said, YA literature is not limited to these traditions. They are just part of the language that serve as the context and the backdrop for reading YA, and readers will use these traditions to help interpret the author's work whether the author wants them to or not. So an author that defies the typical YA style is still reacting to that said style, and reactions to YA are inherently part of YA.

In terms of tropes, there is another genre of literature that Suite Scarlett could be characterized as that I am not extremely familiar with. This is "girl books"--honestly it is less a genre and more of a stereotype. I try not to put too much stock in stereotypes, especially concerning gender, but that didn't stop it from shaping my expectations, and it's something that I've tried to keep in mind during this review. I mean, marketing exists. What else can I say?

For me, one of the defining elements of the YA tradition is the way that characters develop. It is not hard to imagine that in general, growing people will relate better to characters that are growing too. I feel like the growing/not growing dichotomy is the most important and most obvious way that YA authors show contrast between characters in their books.

Despite the hatred that its forced reading brought to me when I was younger, the best example of this kind of character development remains Charles Dickens' Great Expectations. I find that the best way for me to understand how a young protagonist in any novel is developing is by saying "they're developing in the opposite way of Pip from Great Expectations", by saying "they're developing in the same way as Pip", or by saying something else along those lines. My hope is that this reveals less about the way I read books and more about the fact that Great Expectations, while widely considered boring, is as close to the Platonic Ideal of young adult character development as you can get. This ideal is as follows: the character starts out one way, then their circumstances change, and then the character grows (or possibly shrinks) in response to their circumstances.

That ideal covers what happens to Huck Finn, what happens to Holden Caulfield, what happens to Harry Potter (once per book), what happens to precisely one character in each of the Narnia stories, and each volume of His Dark Materials. My aim here is not to make it sound like all these books are the same. What makes this concept, and these books worth interesting is how the reaction manifests itself each time, and especially how the supporting characters frame the growth.

Huck Finn's growth is framed by the pathos of Jim's unchangeable situation--imagine how much better off Jim would have been if he was the young one, who got to have his circumstances changed! In many cases, Harry Potter's growth is juxtaposed with the lack of appropriate reaction of both his peers and superiors, each time revealing a particular flaw in the framing character. Part of Rowling's genius is this type of subtlety: instead of character flaws being revealed by the presence of incorrect action, it's the absence of correct action. Even the mightiest, most pure, and most good characters can be flawed--without even requiring them to ever fail in their goodly endeavors. Lewis takes the opposite tack--revealing these flaws in order to show that everyone except one specific character's goodness is fallible--yet he does it with precisely the same technique, merely targeting different characters.

On To The Actual Review

[Maureen Johnson. Believe it or not, I kind of have a weird internet-celebrity crush on her.]

So when I read Suite Scarlett, the whole time I'm working on figuring out why she's reacting the way to the change in her situation, and how this particular change is different because it's a "girl book" rather than if it wasn't. But where Maureen Johnson succeeded in terms of form, for me, was that the pieces of literary language that make it a "girl book" were really only taking place in the scenery. Rather than being the defining elements of Scarlett's growth as a character, most of the stereotypical content simply served as Scarlett's reward. So what I'm saying is that Scarlett's situation, and her successes and failures, and even her desires and relationships with others were something that any reader could relate to, and that's why I'm still suggesting that you read it, even if you're a boy.

Another aspect of Scarlett that resonated with me was its parallel development of internal conflicts against different types of chaos. As Scarlett's story begins she is in a typical place for a novel's protagonist: she is meeting the status quo but is still slightly disappointed with herself. Then, chaos is thrust upon her, and she panics and flounders around. But eventually, she embraces the constructive aspects of that chaos, overcomes the negative aspects, and by doing so surpasses the original source of the chaos and finds herself its master, or at least its equal.

There are at least three different plot-lines in Scarlett that the previous paragraph could be describing, and the way that they develop in parallel, interwoven with each other, intensifies the importance of every event that makes them up. Honestly this is the most incredible and intriguing aspect of the novel for me--despite any other feelings I have, it shows that Johnson definitely has some chops.

Whether Johnson intended to make some kind of Taoist point about the reconciliation of opposite types of energy--if you interpret Scarlett at the beginning of the novel as anti-chaotic, rather than neutral--or if she intended to merely make a statement about chaos alone, is difficult to say. I definitely look forward to reading Johnson's other novels (particularly the sequel to this one) in order to further explore her imagination concerning this type of conflict.

So, that's the good. As unlikely as it seems that she intended her novel to reinforce my positive feelings for eastern philosophy, they say you shouldn't look a gift horse in the mouth.

My Personal Opinion on Prose

[Joan Jett: I love you.]
[Cedric Diggory: Stay away. I am a scary vampire. Our author feels the same way about scary conjunctions. Also scary dependent clauses.]
[Joan Jett: I also love rock and roll.]

The less good is that I don't prefer the prose. But I'm using the word "prefer" there for a reason. I readily admit to being a complete snob about prose. Although by all means they do not dominate my reading habits, I seriously enjoy reading books that require extra effort just for me to parse the words into thoughts. So you can take this whole section with a grain of salt.

Here's how I rank the prose of other books, for comparison: Twilight was so bad that I literally could not finish the first page--it was like trying to read the magazines they sell by the checkout at the grocery store. I successfully read The Da Vinci Code, but it was bad enough that once per page I involuntarily twitched--like reading the average newspaper. Reading most YA literature isn't too bad, it's more like reading a slightly more distinguished newspaper, like the Sunday edition of The Wall Street Journal or something.

Classic YA like J.D. Salinger's Catcher in the Rye is usually much better than those; it's got intricacies and patterns that develop and establish the narrator as a real character--this is even the case in books I like without a character narrator, like one of my favorites, William Gibson's seminal cyberpunk novel Neuromancer. And then above this is prose that blurs the line with poetry. I love translations of actual epic poetry like Beowulf and Homer's Odyssey, but my favorite style of writing is the postmodern "prose-poetry" of authors like Don DeLillo, Thomas Pynchon, and David Foster Wallace.

Maureen Johnson's prose in Suite Scarlett is extremely average. It doesn't cause me any distress or unwanted distraction but I don't feel like it's really an active part of the novel. I feel like it's the goal of some authors to make the prose as transparent as possible, so that you don't even notice it and the ideas just kind of appear fully formed in your imagination, like you're watching a movie, which can be good, but unfortunately it isn't the style I prefer. Instead, I feel like prose is a wonderful tool that the author could be using to make their work more interesting and multifaceted, but in this case it's just kind of lying there, neglected. But others disagree with me, and I'll readily admit that this is personal preference, albeit a preference I feel strongly about.

New York

[The New York that the book does not make me think of.]

Ironically, the aspect of the book from which it gets its title is also the one that I remain the most indifferent towards: the setting. Scarlett takes care of a suite, in a hotel, in New York City. New York is barely explored by the plot, and was rarely used for imagery and mood--it seems to me that the only reason New York was chosen was because the plot required a city with an active theater scene. The hotel serves as a perfect excuse for much of the previously mentioned chaos introduced by the primary chaos-introducer, but the plot itself didn't require that Scarlett live there, just work there, with the possible exception of the payoff of Scarlett's development at the very end of the story.

On the other hand, having it set in a hotel was fun, and provided an excuse for many of the characters' attributes. Unlike the city as a whole, the hotel flavored the atmosphere pretty effectively. The problem might be that when someone brings up old New York hotels, the first thought that pops into my head isn't "how interesting!", but even still, I would have liked to hear more details in the description of Scarlett's particular suite. So while the setting added some flavor and color to the characters and plot, I wish it had been fleshed out a little bit more.

That pretty much wraps it up--despite anything I said to the contrary, I really enjoyed the read. I mean look at all these thoughts that this book caused me to think! Isn't that just as interesting as a book that was actually about those things? Even if Maureen Johnson's intent was simply to make me think about hotels and cute boys, she did a lot more than that. Her writing is fun, inspiring, and refreshing, therefore:

I recommend this book for anyone who loves giraffes who love giraffes.


Wednesday, July 20, 2011

Exploring the 555: Why the 555's latch type is responsible for it's ability to function as a frequency divider

So I've done a fair bit of analysis of the canonical monostable multivibrator #circuit implemented via the 555 timer integrated circuit. I pretty much grok almost everything about it, with one problem. According to Wikipedia, the internal latch is an RS-latch, but based on its operation, {R,S}={1,1,} sets Q to 1, rather than toggling it or resulting in instability or oscillation.

Unfortunately, the schematic provided by National Semiconductor is a mess of transistors, and the corresponding component in the block diagram is labelled "flip-flop", with no intermediate block diagram or extra details concerning the type of flip-flop present at all.

Googling, however, reveals that it must be an S-latch, and indeed, the fact that the 555's latch is specifically an S-latch is vital to the operation of the Atari Punk Console, or any circuit that uses a monostable mode 555 as a frequency divider. It is not surprising that I can't find a design for such a frequency divider circuit that comes with a proper explanation.

The insides of a 555:

Anyway, the way that the 555 works is this:

  • The timing cycle is initiated by a certain voltage at the trigger input, TRG.
  • The timing cycle is terminated by a certain voltage at the threshold input, THR.
  • When the output is high, the discharge input, DIS, becomes grounded by a low impedance.
  • These aforementioned "certain voltages" are proportional to the common-cathode voltage, VCC, unless the control input, CTL, is used. The precise way in which it is affected requires too much mathematics for this blog post.
  • The reset input, RST, hard-resets the entire device.

The inputs that start and end the timing cycle, !TRG and THR, are fed directly to a type of circuit called a comparator. A comparator compares two voltages, and outputs either a high voltage or a low voltage, depending on which of the two input voltages are higher. One comparator compares THR to (2/3)*VCC. The other comparator compares (1/3)*VCC to TRG. These comparators detect when the timing cycle should be initiated or terminated by those "certain voltages" I was talking about.

The two comparators are connected to a latch. A latch is a circuit that "remembers" whether it's previous output was high or low if it is given no inputs. That is, you turn it on with a pulse to one input, and turn it off with a pulse to the other input. Between these pulses it remains on if the last pulse was to the S, "set", input and remains off if the last pulse was to the R, "reset" input.

Here is the actual monostable circuit:

In monostable operation, nothing happens until TRG falls below (1/3)*VCC. This comparator is connected to the "set" input of the S-latch, which turns the latch on. The latch remains on whether the "set" input is left on or off, until the "reset" input of the latch is enabled. This input is connected to the other comparator, and therefore the latch is reset only when THR rises above (2/3)*VCC.

The operation depends on two external elements, a resistor and a capacitor. A capacitor is like a tank that holds electrons. If you put a bunch of electrons in it, then its voltage rises. If you let the electrons out, its voltage falls. A resistor acts like a valve that controls the rate that the electrons enter the capacitor. If the capacitor was connected to ground, all of the electrons would leave immediately. If it was connected to a battery, as many electrons could fit inside the capacitor at that voltage would enter it immediately. But through a resistor, it charges or discharges more slowly, at a very specific rate.

(This rate can be found by solving this first-order differential equation:)

C\frac{dV}{dt} + \frac{V}{R}=0

The way that THR's voltage changes, and the existence of DIS, is what causes the circuit to be a timer, rather than just a flip-flop with analog inputs. When the output is low, DIS shorts the capacitor to ground, and all the electrons leave immediately, but when the output is high, the capacitor is charged via the resistor, and THR takes a certain number of seconds to reach (2/3)VCC. By setting THR equal to the capacitor's voltage, a negative pulse of any relatively short duration at TRG is converted to a positive pulse of a precise, constant duration dependent only on the values of the resistor and the capacitor.


Enjoy this graph:By "relatively short", I mean shorter than the time it takes for the capacitor to charge from it's initial voltage to (2/3)VCC. If it's longer, then the output pulse will be exactly the same length as the input pulse. This characteristic is precisely what allows this implementation of a monostable multivibrator to function as a frequency divider, and is due to the fact that the latch must be implemented such that {R,S} = {1,1} is hardwired to result in Q = 1.