Tuesday, February 28, 2023

The Playing Field

Over the last decade, I’ve interviewed and assessed more than 5,000 investment managers. One of the most important things I’ve learned in that process is what separates the great investors from the rest. The great ones view investing as a game, and they know exactly what game they’re playing. It brings to mind an observation from the philosopher Kwame Anthony Appiah:

“In life the challenge is not so much to figure out how best to play the game; the challenge is to figure out what game you’re playing.”

One great portfolio manager I know told the story of being driven somewhere by an analyst on a rainy night when a truck swerved and almost ran them off the road. “Why is stuff like this always happening to me?” the analyst instinctually responded. But to the portfolio manager, that response reflected a terrible mindset, whether on the road or in the market: a sense that the world is acting on you as opposed to your acting on the world. It is a mindset that is hard to change. But from what I’ve seen, great investors don’t have it. Instead, they’ve come to understand which factors in the market they can control and which factors they cannot.

One way to relocate your locus of control is to frame investing (and even life more generally) as a game. This allows you to experience luck as luck, to separate the hand you drew from the playing of that hand. As David Milch, the creator of the HBO show Deadwood, put it, he realized late in life that “it’s the way you learn to play the cards you’ve been dealt, rather than the hand itself, that determines the worth of your participation in the game.”

For investors, I’ve come to think of five levels of the game:

1. Apprentice — learning the game

2. Expert — mastering the game you were taught

3. Professional — making the game you were taught fit your own strengths and weaknesses

4. Master — changing the game you play as part of your own self-expression and operating at scale

5. Steward — becoming part of the playing field itself and mentoring the next generation

Level 1: Apprentice — Learning the Game

Each year around 100,000 new college graduates apply for internships at investment banks. Around 10,000 get a spot. After three years of banking boot camp, roughly 4,000 of these analysts want to become investors. Add in some analysts from management consulting and accounting firms, plus a handful of lawyers, and you get around 6,000 talented candidates interviewing for buy-side positions. About one in six gets a seat. So imagine a new cohort of roughly 1,000 twenty-somethings joining 15,000 existing analysts and portfolio managers at hedge funds, and another 30,000 long-only investors.

This new cohort steps onto the field with some training in accounting and valuation, but each member is otherwise a blank slate. At this level, the most efficient way to learn the initial craft of investing is to find a mentor. This is what Robert Greene has called the “apprenticeship” stage, and the person you are apprenticed to is extremely impactful.

I have observed that people who begin on the sell-side or in mutual funds seem to retain that initial frame on how markets work for much of their careers. Years after working at Fidelity, an analyst will still refer to “sector rotation” as an explanation for why one set of stocks is ascendant, whereas someone who began their career at Goldman Sachs would never think of sector rotation as a useful concept. Learning how to model and value companies, to diligence and interview industry sources and management teams, and to identify, with the help of a mentor, the key drivers of a company or a stock.

Level 2: Expert — Playing the Game You Were Taught

The survivors of a reasonably difficult transition from analyst to senior analyst or portfolio manager reach the second level, usually in their late 20s or early 30s. The analyst moves from processing other people’s research agendas to generating the ideas.

Many investors plateau at this level, particularly if they practice their craftoutside a “cognitively diverse” city like New York or London. They often have a somewhat static sense of identity, such as “I am a value investor like Warren Buffett.” This puts them in competition with the index, playing a game that is defined entirely by their peers. By constructing their identity as an “expert” atinvesting in certain sectors or companies, they limit their ability to observe change in those areas.

Some Level 2 investors who are traders feel like impostors next to their more analytical peers. But over time some may come to see that filtering otherpeople’s ideas represents an ability to identify key drivers of the game. This type of senior analyst can actually more easily become a portfolio manager who owns ideas through his analysts, while the more “analytic” senior analysts, who do their own deep research on each investment idea, are less able to build out a full portfolio.

While traders still need to train themselves to dig deeply, the essential skill isspotting the key drivers of a situation — seeing the underlying reality — not coming up with the raw analysis. Pride of authorship is an obstacle when it comes to making money.

Attrition at this level is high. Each year ten percent or more of this cohort either peels off into non-buy side roles (marketing or operations) or leaves the industry. The system sorts the more relationship-oriented “fast twitch” people into roles as dedicated traders or marketers.

Level 3: Professional — Fitting the Game to Your Own Strengths and Weaknesses

Level 2 investors who evolve to Level 3 shed habits of imitation in favor of their own investment styles with their own idiosyncratic strengths. Many of the most successful portfolio managers of any age or tenure are at this stage.

At this level, an investor begins to consolidate multiple influences into a unique strategy, going beyond his or her original mentor. Warren Buffett may have been at this phase of his development in the 1980’s when he said. “I’m now 15% Phil Fisher and 85% Ben Graham.” He elaborated: “Charlie [Munger] shoved me in the direction of not just buying bargains, as Ben Graham had taught me…it took a powerful force to move me on from Graham’s limiting view. It was the power of Charlie’s mind, he expanded my horizons.”

One game that is currently operative among many skilled investors is buying quality companies in the midst of short-term difficulties. When Rupert Murdoch was forced to split News Corporation into two after the phone-tapping scandal, its high-quality media assets were available at a discount — and smart investors grabbed them. The same playbook worked for Moody’s as it struggled through lawsuits after the financial crisis.

But a game like this will likely work for several years, before it becomes such a common approach that these “quality” stocks will become less volatile during periods of stress (many high-quality consumer stocks in Asia currently seem immune to sell-offs based on macro uncertainty). So an investor who uses only one game will have less sustainable returns than those who reach the next stage: putting in the time develop new games even while playing the existing one.

The critical challenge for Level 3 investors is to find a way to be exposed to Level 4 investors. If their world consists of only Level 2 and 3, they may stay where they are for the rest of their careers.

An analogy from competitive swimming is useful here. The sociologist and coach Daniel Chambliss has observed that what he at first thought of as different levels of swimming are in fact different worlds:

Beyond an initial improvement in strength, flexibility and feel, there is little increasing accumulation of speed through sheer volume of swimming. …instead, athletes move up to the top ranks through qualitative jumps:noticeable changes in their techniques, discipline, and attitude, are accomplished usually through a change in setting, e.g. working with a new coach, new friends, etc.who work at a higher level. What I have called “levels” are better described as “worlds” or “spheres.”

In the investing field, there are also sub-worlds. An analyst who apprentices and then achieves expertise or professionalism within a certain sphere might define what level of game is possible based on how his or her portfolio manager and peers’ portfolio managers define “world class.” But from a higher balcony one might view even excellent process and results as actually just the best at a given level.

Most managers take in capital in excess of what their game permits them to manage in a world-class way. Only someone with the confidence born of a long-time horizon can resist the urge to make more money in the short term while risking mediocrity in the medium term. It is only as managers transition into level 4, that their skills allow them to manage capital at scale.

Level 4: Master — Changing the Game You Play

TS Eliot observed that “only those who will risk going too far can possibly find out how far one can go.” Getting to level 4 requires what one investor I admire calls a “belief in what’s possible.” The small minority of managers who reach this level are truly “absolute return”-oriented: they define success in terms of what they believe they can achieve over decades, not relative to what others are achieving at a given moment.

David Tepper is a good example. If you invested $1 million with Tepper when he opened his fund in 1993, it is worth well more than $150 million today.

Tepper appears to be using multiple mental models when he invests, choosing what works for a moment or context rather than being constrained by his historical role as a “distressed debt investor.” If you monitor the 13F filings of the stocks he owns, he appears to move effortlessly across sectors and asset classes, scooping up dollars as he goes. You would have a difficult time deciding what benchmark or comparable fund to judge him against.

In my interactions with investors at this level, there are several attributes they seem to share:

Open-minded with a point of view

When we interact with a Level 4 investor, the dialogue is different from the traditional “pitch” or “update” we get from others. Harvard professor Bob Kegan has the best description of the mindset:

People with self-transforming minds are not only advancing their agenda and design. They are also making space for the modification or expansion of their agenda or design. Rather than inquiring only within the frame of their design (seeking information that will advance their agenda), they are also inquiring about the design itself.They are seeking information that may lead them or their team to enhance, refine, or alter the original design.

I see this “open-minded with a point of view” mindset reflected in the way someone grips his or her investment ideas or strategies. Lower level investors are sometimes surprisingly definitive in the way they describe an investment opportunity; they have a too tight grip.

When my partners and I connected one Level 3 manager who was long a stock to a Level 4 manager who was short it, the Level 3 manager viewed the conversation primarily as an occasion to convert the short seller to his point of view. His evangelical approach to the conversation meant that he failed to elicit a number of important data points from the short-seller. Even worse, he failed to take the opportunity to learn subtle elements of the other manager’s research process that might be useful in his own short oriented research in the future.

Keeping score in dollars extracted from the market, rather than whether a piece of analysis was correct, is one of the most effective strategies for maintaining the optimal “grip” on your investment ideas. While any fixed identity may constrain someone’s viewpoint, the identity of “I am great at making money” allows greater flexibility than “I am smart and therefore I make money” or “I am an expert at investing in financial stocks.”

Level 4 investors seem, at one moment, to focus on the businesses themselves, then switch perspectives the next moment to see the business as a “stock,” then switch again to identify the moments in time when one factor is driving the entire stock market.

Robert Greene notes that the “Master” is observing not just “the moves of the pieces on the chessboard but the entire game, involving the psychologies of the players, their strategies in real time, their past experiences influencing the present, the comfort of the chairs they are sitting in, how their energies affect each other — in a word, everything that comes into play, all at once.”

Sometimes the ability to shift perspective involves an empathetic mindset.

Paul Tudor Jones has described how in 1990 he was able to put himself in the shoes of a typical Japanese fund manager under intense pressure to return at least 8% a year. When the market corrected by 4% that January, Jones’ empathy helped him realize that the fund managers would be risking their jobs to double down; he was thus able to predict, correctly, that they would shift to bonds and the stock market would continue to sell off.

Level 4 investors relate to other market participants, their employees, and their investors as chess pieces in a game of their own invention, a game that is “for” them.

Relationship to time

Level 4 investors display the full range of urgency and patience, of aggression and conservatism, of trying to make money now but also knowing they will be investing for decades. They adapt their tempo to the pace of the market and decide how and whether to position themselves based on whether they “see the ball” at that moment.

You can gauge this orientation toward time by how an investor thinks of success: is it primarily in terms of an internal rate of return or as a multiple of money? Analysts often begin with a MOM mindset — success is doubling their money on an investment over any time horizon. But skilled portfolio managers have at times a sense of urgency — they want to pull that time horizon forward as much as possible — and at times a sense of patience — they wait to participate until the moment of sharpest appreciation (or decline) in a given security.

An investor’s relationship to time also influences how he or she views periods of recovery or quiet. Good investment management comes from a mindset reflecting the assumption that the manager will be investing for decades, but that investment activity is as a series of sprints and recoveries rather than one extended marathon. As Lenin once said: “There are decades where nothing happens; and there are weeks where decades happen.” The tempo of a strong investment culture is in sync with the reality of long periods of inactivity.There is often a shared mood that the game is afoot, but not a rushed feeling to do something based on fear or greed. Then, when the moment is right, top investors are startlingly aggressive.

Relationship to risk

Sometimes an investor’s vocabulary reflects a desire to expand what is possible around risk taking. Stan Druckenmiller said once, “There is a phrase on Wall Street that I think is completely wrong: bulls make money, bears make money, and pigs get slaughtered. It takes courage to be a pig, but you want to be a pig with discipline. Three or four times a year you have conviction, and it is when your conviction is high that you have to bet big.”

Investing ultimately requires a nuanced relationship to fear and greed. As investors mature, they can sometimes push those emotions into conscious awareness and manage them better.

David Tepper notes, “We’re value-oriented and performance-based like a lot of funds. But I think what differentiates us is that we’re not afraid of the downside of different situations when we’ve done the analysis. Some other people are very afraid of losing money, which keeps them from making money.” In my experience, Level 4 investors are more tolerant of risk than other market participants.

This greater risk tolerance may come in part from the fact that the Level 4 investor does not view his identity as at risk in a given investment, and instead sees interacting with the markets as an occasion for rapid feedback on his own development. The philosopher Paul Tillich defines power as “the drive of everything living to realize itself, with increasing intensity and extensity.”

The Level 4 investors I have met have an unusual intensity and see their interactions with the market to more fully realize themselves. This sense of equanimity and a certain fearlessness — a form of wisdom — that emanatesfrom a Level 4 investor is perhaps what the markets are recognizing as they hang on the every word of David Tepper.

Level 5: Steward — Becoming Part of the Game Itself

Level 5 investors have achieved a mastery at investing, and a level of financial success, that allows them to turn some of their attention to taking care of the playing field itself. They may have preferred to keep a lower profile in earlier stages, but have since become willing to influence those outside their immediate orbit, including by acting as role models and mentoring younger players. They have begun exploring how they relate to the system itself — and how their actions help shape it.

There are very few Level 5 investors, but Warren Buffet is certainly among them. Buffett has steadily increased his public presence over the last several decades and he was even more present in the media than usual during the 2008 financial crisis. He regularly went on CNBC and Charlie Rose to try to calm market participants and encourage Congress to act on fiscal stimulus. He used metaphors designed to appeal to a broad swath of the public, in the hope of building support for congressional action: “Look, the patient is undergoing cardiac arrest right now and the first thing we have to do is to stabilize the patient.” His authority had reached a level that allowed him to take responsibility for the system itself — to assert our collective reality, operating in an entirely different realm from the participant who preferred to remain at his desk shorting financial stocks.

Buffett has also waded into the more philosophical end of discussions of income distribution, offering an elegant parable that makes John Rawls’ veil of ignorance accessible to financial-market participants:

“It’s 24 hours before your birth, and a genie appears to you. He tells you that you can set the rules for the world you’re about to enter — economic, social, political — the whole enchilada. Sounds great, right? What’s the catch? “Before you enter the world, you will pick one ball from a barrel of 6.8 billion (the number of people on the planet). That ball will determine your gender, race, nationality, natural abilities, and health — whether you are born rich or poor, sick or able-bodied, brilliant or below average, American or Zimbabwean.“This is what I call the ovarian lottery. You’re going to get one ball out of there, and that is the most important thing that’s ever going to happen to you in your life. That’s a good perspective to have when setting the rules for our world.“We should be designing a society that doesn’t leave behind someone who accidentally got the wrong ball and is not well-wired for this particular system.”

No matter what ball you got in the ovarian lottery, what card you were dealt, what game you are playing or think you’re playing, I think it’s useful — even for those of us who aren’t masters — to occasionally zoom out for a bird’s eye view of the playing field.

Back to menu



from Hacker News https://ift.tt/2FgiVux

Ask HN: Who's an open source maintainer/project that needs sponsorship or help?

Following an earlier post https://ift.tt/2g9mHbw & suggestion from hiccuphippo, we should take the time to recognise & reward the open source community we depend on.

It would be great if the HN community could nominate maintainers or projects they know who's super helpful & impactful. We hope that by creating awareness about the issue we can also help increase the funds going to that maintainers.



from Hacker News https://ift.tt/PntL6AK

How they filmed The Last of Us arcade scene

So ChanceKJ and I were brought in by HBO to work on this arcade for the show. Theres lots to unpack, so I'll be brief for now until i have some more time to explain some more stuff.

Inside the Mortal Kombat II cabinet was actually a 46 inch OLED panel that we rotated 90 degrees. The gameplay footage was all played and captured ahead of time by myself while Chance and I worked through the script, making sure we got all the moves down that they wanted to show (fatalities included). I treated the footage with scanlines, some curvature, and rounded the corners off so it looked a little more like a real CRT. We programmed an interface we could control remotely on the day that would instantly play a clip from the game on demand and basically played it back in real time with the actors as they shot the scene. So when you see them drop one coin in, thats an individual clip, 2nd coin, another clip, character selection, yet another clip and so on.

Sync'ing a camera to CRT displays can be done, but you really can only guarantee it'll sync with a few at a time. Some games stray slightly or drift, so even if you get the camera to sync, you'll lose the CRT and start to get some bad flicker at some point. For Cinematographers, there is a rule of 180 degree shutter. So if you're shooting at 24fps, 180 degree shutter angle will put you at 1/48 shutter speed. This is what gives you the cinematic look and feel and blur that we're all used to. You can change shutter angle slightly but it will impact the feeling of the movement of the shot. Obviously CRT refresh rate doesn't divide into 24/48 very well, so thats why you get the flicker.

While we got Mortal Kombat to MOSTLY look like a CRT on camera, it was an expensive process (time and money) and we did do it for a few other games in the arcade, but time was not on our side to make it happen for every game. Some games we killed the monitor completely (like the Asteroids deluxe), the thought was that after sitting for a bunch of years, a good chunk of the games are not going to quite work right. We were ready to kill Black Widow, but the director liked the look of it, so it was kept.

Some games we programmed to have a glitch or sync issue in. We had a few games legit shit the bed. There is a shot early on in the arcade scene where you can see a Buck Hunter game with a failed hard drive in the background and the screen is flickering. Totally plausible and we just ran with it!

 



from Hacker News https://ift.tt/olEqf7s

World Building with GPT

I’ve been doing lots of experiments with GPT, though I’ve only written about one until now… the more serious something is the harder it is to call it finished or identify the outcomes. Here I’ll describe something a bit lighter: world building, or specifically city building, with GPT.

This post is for people who are interested in building interactive tools on top of GPT and want to see some of the things I’ve encountered and what I’ve found that is successful and what is still a challenge.

Where it started

I enjoy game worlds where the world seems alive and the details suggest a backstory. The real world both is and isn’t this way: every house has stories, people invested in its details, each building is occupied and reoccupied repeatedly. But our world is also quiet, private, less eccentric than we might want, and imaginary worlds can be fun. Procedurally generated roguelike games give some of the excitement of exploration but lack story and depth. A game like Stardew Valley has stories but is necessarily pretty small and static.

With generative AI we can change these trade-offs! Is it possible to make a big world that is both eclectic and consistent? Can it include story and personality? I don’t know the answer, but I’d like to share what I’ve got…

The tool

In a previous experiment in story building I used a step-by-step approach: generate the first passage, generate a next passage, etc. That’s appealing and simple but leads to a wandering and unstructured narrative. I believe in both stories and worlds we want a kind of fractal complexity: at each scale we want most things to be “typical” but also some surprise. In a story the surprises might go from large to small scale like: an unusual character arc, a surprise plot development, an alternate perspective, an unexpected response in dialog, a perceptive detail in a description, and an unusual word in a sentence. If you always write the-most-likely-next-thing then it’ll be boring. If you only write surprises then there’s nothing to even be surprised about.

Similarly we want to build a world or city that expresses a broad theme and consistency, but also has diversity and surprises throughout it. To do this I’ve approached the building hierarchically:

  1. Establish the type of city (medieval, fantasy, noir, etc). Give it a name and some story.
  2. Identify distinct neighborhoods.
  3. Create buildings in those neighborhoods.
  4. Create people associated with the buildings.
  5. Populate the buildings with rooms, furniture, and objects.

There are problems with this approach that I’ll touch on later, but it’s a start.

You can see it in action here:

What works?

Some stuff I really like…

GPT-generated lists

GPT is good at coming up with lists: lists of city types, names, people. As I used the tool more I started to have my own opinions on what I wanted to make, but those lists were an important part of expanding my own imagination. I’ve made other experiments where I filled in all the initial information by hand without any GPT suggestions, and I miss the lists.

Natural language context

The cities are formed in a top-down way, and all the top layers (city, backstory, neighborhood) are purely context. The top layer descriptions are very important but have no need for structure, it’s all just language. Not every aspect has to be enumerated, just the ones that seem important for this city.

Reinforcing city character

A general character to the city (e.g., “fantasy city”) isn’t enough to build something consistent. The character of the city needs to be repeated and reinforced at different levels. Details like architecture and building materials may have to be specified.

This is primarily done at the neighborhood level, though it would benefit from building-specific attributes more strongly informing person generation. For instance in a fantasy city it’s common that everyone will start out powerful and loyal and wise, even when they occupy a hovel or explicitly partake in the dark arts.

Structured output

When we get to parts with specific structure it’s a comfortable transition. Buildings have sizes, people have roles, etc. GPT can fill in these details. If you wanted to plug the city into a map builder or other structured game format, you can produce the metaata you need.

Filling out content you create

When you don’t want to take a GPT suggestion, GPT is pretty good at filling in the details in something you produce. So if you ask for a “factory” it works well for GPT to turn that into a fuller description, size, etc.

I only implemented this for structured elements, and not freeform fields like neighborhood descriptions. I should fix that!

Pushing GPT helps

Small contextual prompt additions can be helpful. For instance GPT has sometimes wanted to suggest sofas and armchairs for a factory, but a small note (“factory equipment and tools”) can fix that.

However I’ve found this needed too often for character descriptions. The descriptions start out seeming OK but begin to feel boring and repetitious. The building and neighborhood need to more explicitly affect the people prompt. Right now the prompt is effectively:

[General city context]
A list of owners, caretakers, residents, tenants, and other inhabitants for [Building Name] ([Building Description]) Give each person an interesting and culturally appropriate name and a colorful background and personality.

If you ask a more open-ended question like:

Make a numbered list of the kinds of people that would occupy a building called [Building Name] described as: [Building Description]

then you get a good list of professions and roles (better than my hardcoded set). If you add this:

For each item include a 10-word note on the likely personality, limitations, and character flaws

then you also start battling the relentless positivity, with results like “Supply Chain Managers: Responsible and knowledgeable, but prone to micromanaging” and “Magical Robots: Resourceful and imaginative, but restricted by programming”.

[Note: after writing this I implemented a list of jobs/roles as part of buildings; it was effective!]

Putting people in buildings is great

For all my criticisms in the previous section, adding people is great and I only want it to be better! Buildings have some history and personality, but the people associated with them make it seem much more alive.

Razzaqua Sephina: Razzaqua Sephina is the mysterious and enigmatic owner of the Warehouse of the Cankered Crypt. She is a master at thaumaturgy, specializing in curses and dark artifacts. Those who have met her say she is as cold as ice. Despite this, locals claim she is fiercely loyal and protective of her tenants.

Kana Wazri: Kana is a charming young student from a well-known family of merchants. She has a great love of magic but isn’t incredibly talented at it. Despite this, she is always seen studying and researching the magical arts, hoping to one day unlock her true potential.

Morgaine de Sombra: Morgaine de Sombra was an aristocrat in the court of King Tragen before she found her calling in the dark arts. She runs a tight ship, instilling a sense of discipline among the students of the Academy. Morgaine has a no-nonsense attitude when it comes to teaching and is feared by many of the students.

Fayza Silverwing: Fayza is a beautiful priestess, wearing a dress of shimmering pearlescent feathers. She is gentle and kind, and her voice is melodious and soothing. She uses her singing voice to call down the blessings of the sky goddess, and to ward off evil. She also tends to the birds of the temple, providing them with a special place to dwell.

Mathilde Velasquez: Mathilde Velasquez was a cunning and ambitious woman in life, a talented emissary and negotiator. She was the right hand of an 18th century nobleman, and in death, she still roams the halls of the Mansion, planning out her strategies and scheming her way through the afterlife.

I had to nudge some of these into existence, but I’m still quite enamored with the variety it can produce, and believe GPT can do much better with further refinement.

What doesn’t work?

I think these things could be fixed, but they aren’t yet, and if you implement something similar you are likely to encounter these same problems:

Reverting to normal/boring

GPT is constantly normalizing things, including modernization. I want to make weird stuff, but also stylistically consistent stuff.

As a general rule asking GPT for a list will help it be more creative. But when it gets on a roll producing normal/boring things, it will fill out the list with normal/boring things.

Examples of this: “smart homes” (there is no time when I want “smart homes”), lots of references to tourism, “high-end restaurants”. How many cities should have art galleries? The primary attribute of a harbor area is not its historic cobbled streets and tourist amenities. These are all examples where GPT introduces a modern perspective.

GPT is desperately positive

Every building is grand. Every character is loyal and helpful. Every character is competent, respected, and wise.

If you ask very explicitly for flaws you can get some. It’s very hard to get a truly despicable character. It’s hard to even get a realistically boring character, one who is not very competent or smart. It’s a fight, but armed with prompts we can still win the battle!

Some things that have helped:

  1. Asking for “exotic names”: this seems to result in a wide variety of ethnic names and other interesting combinations. For any one list GPT will often choose one ethnicity, such as Arabic names or Japanese names.
  2. Colorful background/history”: this adds some playfulness
  3. Mentioning “culture”: this seems to fight against normalizing to modern American themes
  4. Asking for “personality” or “character” in something: similar to “colorful”, this also tends to extend the descriptions
  5. Ask for “negative attributes”, “flaws”, “Achilles Heal”: descriptions will still be positive, but you’ll get some additional negative attributes

Fine detail is too much work

Once you generate a building and occupants you also have an opportunity to build rooms, to put furniture in those rooms, to put items in those rooms, and finally to define the room connections. This takes forever and is very boring!

Many rooms have tables! Many buildings have a storage room! Many kitchens have utensils!

To generate real maps you do need these more concrete features. A building with no interior is no fun. An interior with no objects is no fun.

If I were to approach this again I’d use this strategy:

  1. Ask GPT for building “types” when creating a building. Maybe offer some initial types, but also invite GPT to make up new types.
  2. For each type of building ask GPT to create an expansive list of rooms. Give the rooms types as well (hang-out, cooking, storage, etc). Ask for a range of room sizes.
  3. For each type of room, or perhaps building-type/room-type combos, ask about furniture and items. Again ask for a long and expansive list.

At this point you could use a simple non-GPT algorithm to assign rooms to buildings. But you could also use abbreviated forms of these list and ask for GPT to fill out a building, like:

The building is called “[Building Name]” and is described as: [Building Description] Fill out this list:

  1. [Room type]: [description]
  2. [Furniture]: [description]

… basically letting GPT customize the building in one step, given a randomly chosen set of specific elements.

Bad spatial reasoning

GPT’s spatial reasoning isn’t very good (unsurprisingly). It’s OK at general sizes and heights of buildings, but when it has to relate spaces to each other (like placing rooms in buildings) it doesn’t understand.

This probably calls for traditional procedural generation techniques.

It’s possible that GPT could help by coming up with constraints. For instance when generating rooms GPT is asked if the room is “public”, “private” (impolite to enter), “secure” (locked), or “secret”. These hints could provide constraints that keep the room layouts plausible.

Every detail of a prompt is a suggestion

It’s very hard to tell GPT what is important and what is just framing. Some examples:

  1. In an early prompt I used an example like {name: "John Doe"} for generating a person. GPT started coming up with names like “Jack Doe”, “John Smith” etc., specifically choosing stereotypically generic names. I was able to improve it with a combination of asking for “interesting and culturally appropriate names” and replacing the example with {name: "FirstName LastName"}. (But now every so often GPT spits out FirstName LastName characters; you can’t win them all.)
  2. Even a word like “building” is a suggestion. I wanted to make a floating pirate city made up of attached boats. GPT wasn’t sure whether to make things that matched my city description, or that matched what a “building” typically is, and it suggested a lot of boat-inappropriate structures. Explicit prompt additions can help, but it would be even better if some of the core language could be substituted.
  3. My beaver city also featured far too few dams and dens. Which is too bad because GPT is quite good at helping fill out these weird combinations so long as the prompt doesn’t fight with the premise.

I can imagine having GPT rewrite some of the prompts as the city starts to be defined.

Another option is to have a glossary of terms where the author can adjust a few terms. I’ve specifically allowed the word “neighborhood” to be substituted (for quarter/district/etc), though the effect is minimal and GPT is happy to use different terms for neighborhoods without any special suggestions. Maybe other words are more impactful.

Constantly poking at the prompts is tiresome

Sometimes GPT just doesn’t come up with the right things at all. When that happens there’s a few ways to get GPT to change its output: adding or changing the overall context/backstory, making suggestions for a specific list, and asking for specific items.

Getting fun, interesting, and varied entities requires lots of nudging and iteration. But there’s not many ways to build up those notes. You can add the notes to the global context, and that can be a good idea, but it’s not a good iteration process.

I have a hunch there’s a way to experiment when creating specific buildings/etc, and then use GPT itself to percolate that up into more general prompt changes. But it’s only a hunch.

Hallucinating metadata

GPT will hallucinate metadata. This is both a problem and an opportunity.

If you want to turn the output into structured data for another program you might find it annoying when it uses {size: "6x10"} instead of {widthInMeters: 6, depthInMeters: 10}.

More often it’s actually interesting metadata that you might want to use more widely. For instance:

name: The Cabal Of Witches
hierarchy: Grand Witch -> Witch -> Apprentice -> Initiate
initiates: Keeper of the Dark Art, Spiritualists, Alchemists, Shaman

name: The Circle of Mages
hierarchy: Grand Magus -> Magus -> Apprentice -> Initiate
initiates: Evokers, Enchanters, Abjurers, Illusionists

name: Abandoned Warehouse
dangers: magically-altered creatures, unknown chemical pollutants, trapdoors and hidden passages

It seems odd to produce this metadata when presumably nothing is ready to consume it. But these attributes elicit responses from GPT, and do so more consistently than natural language requests.

Adding this metadata gives theme and variation. The attribute is the theme, the value is the variation. This makes the set of things you’ve created more comprehensible, with a structure that makes it easier to appreciate the variety.

I don’t know how to expose this! Should we ask GPT to brainstorm attributes ahead of time? Invite it to hallucinate more widely and then the author picks the ones they like to become part of the prompts? Then… backfill?

Corruption and fixation

Some of the magic of GPT is how it implicitly learns from context. Often it learns the wrong thing. This is particularly noticeable in ChatGPT, where it will often fixate on something despite or even because of corrections.

This tool is much more explicit about context and doesn’t have anything that is specifically a chat. Still…

  1. You’ll think the content of the backstory is all that matters, but the tone also informs GPT. Because GPT probably created that backstory this doubles down on its tone. (Is this feedback part of its tedious positivity?)
  2. When you ask for “more” of a list it will feed the existing list into the prompt… this helps it create new and distinct items, and sometimes helpfully refers to previous items (like creating interesting relations between people), but if you didn’t like the suggestions before you are unlikely to like the new ones. It copies tone, but also description length, metadata, name ethnicities, and architectural styles.

GPT is expensive

Talamora cost me about $6 in GPT API costs to generate. That’s a lot!

Because I’m paying for API costs directly, and because the costs increase only when I use the tool, there’s a natural balance: if I’m not having fun and enjoying the output, I won’t generate more costs. By the time I made Talamora I had enough improvements that I actually enjoyed the process and my enthusiasm wasn’t just built on dreams (which is the fuel for the first phase of any project).

The cost means I’m not motivated to automate any of the authoring. Perhaps because the output has little intrinsic value, so reducing the author’s involvement is a net loss.

It also means I can’t easily make this available to other people. People are providing these services with “credit” models and subscriptions but the underlying costs are enough that it’s hard to imagine that working. So for now you can try this with your own API key, paying OpenAI directly, and managing your own budget.

There are some ways that this could be made more efficient:

  1. Use other models (e.g., text-ada-001) for some tasks. Though few of the tasks feel amenable to the cheaper models.
  2. Get suggestions right the first time. For Talamora in particular I used lots of prompt adjustments to get results I was happy with. Overall prompt improvements would have avoided many of those.
  3. Reduce context on some queries. The base context of most prompts includes the whole city backstory, neighborhood, etc. That’s not necessary for every query. Perhaps some of the context is only needed for some types of queries.
  4. Get more out of every query. If there’s multiple queries then the context is repeated for each. This saves money when some queries produce dead ends, such as a building that the author doesn’t like and doesn’t want to expand. But adding a little metadata to each item is usually a good investment.
  5. Improve the quality. The more generated stuff you keep, the less queries you need to achieve some degree of success or satisfaction. Investing more time in quality parent context, like backstory and neighborhoods, will pay off with the both larger and more expensive leaf nodes like buildings.
  6. Summarize to reduce context. Right now this concatenate the context information. It might save some space by rephrasing that context, both combining the text in a more compact way, and selecting the salient details for generating specific kinds of items.
  7. Estimating list size for choices. If you get a list of 7 items but then you ask for the list to be extended that is much more expensive than asking for 14 items up front. Similarly if you want 1 item then it’s cheaper just to make one item and not a long list. It’s possible that the parent could estimate the list size for the child, or that we could just make better general estimates and hardcode those list sizes into the prompts.

Image generation

All these words are interesting but some images would also be interesting. Right now there are too many considerations to do a detailed comparison of all of them, and things are changing fast, so I’ll just give a scattering of thoughts.

The generators

I have a hard time understanding the array of AI image generators, but I’ve used these three enough to have opinions:

  1. Stable Diffusion
  2. Dall-E 2
  3. Midjourney

The first two have an API. That means I can integrate them directly into the tool, which has a real and significant workflow benefit. Midjourney has absolute no affordances to integrate it into another application, but it creates great images. Generally I’ve found Stable Diffusion to be unusable because it won’t create sensible compositions. There’s probably some flavor of Stable Diffusion that would work better, but there’s just too much going on! Dall-E is OK but it doesn’t have a natural sense of style and the resulting images… just aren’t very fun.

Generating a prompt

The easy way is just to give the text directly to an image generator and let it imagine things as it will. There’s a danger it will have insufficient context, like being unaware of the era or environment.

Let’s take a building to see. The base text:

Jubilous Forge: A bustling forge bustling with laughter and the smell of hot metal forges and alchemical potions, with ornate decorations on its two-story walls.

It’s already a pretty visual description.

Here’s a quick prompt to expand the visuals:

Given the building: Jubilous Forge: A bustling forge bustling with laughter and the smell of hot metal forges and alchemical potions, with ornate decorations on its two-story walls.

In 2-3 sentences make a detailed visual description of the exterior of the building:

The Jubilous Forge looks like

And it completes with:

a large, imposing structure, with walls of gray stone reaching two stories high. The windows are framed by intricate patterns of wrought iron and the door is adorned with a bright, golden door knocker. The outdoor walls are decorated with vibrant murals of blacksmiths and alchemists at work, lit up by the warm glow of nearby forge fires.

This seems better! Unfortunately it is not… the use of the term “pillar” makes both Dall-E and Midjourney think of banks.

Here’s a generated image from the simple/unmodified building description:

Midjourney - Isometric rendering of single building on a white background: Jubilous Forge: A bustling forge bustling with laughter and the smell of hot metal forges and alchemical potions, with ornate decorations on its two-story walls.

And here it is with the modified description:

Midjourney - Isometric art of a single building on a white background: The Jubilous Forge looks like a large, imposing structure, with walls of gray stone reaching two stories high. The windows are framed by intricate patterns of wrought iron and the door is adorned with a bright, golden door knocker. The outdoor walls are decorated with vibrant murals of blacksmiths and alchemists at work, lit up by the warm glow of nearby forge fires.

The first prompt, which leaves more latitude to Midjourney, works better.

Oh the other hand, in a jungle city there is a building:

The Zigzag Tower: A tall and slender tower with a zigzag facade, The Zigzag Tower is a temple dedicated to the reverence of nature.

The Midjourney results are all bland modern towers:

Midjourney - Isometric rendering of a single building on a white background: The Zigzag Tower: A tall and slender tower with a zigzag facade, The Zigzag Tower is a temple dedicated to the reverence of nature.

When we include the city description and ask GPT to make a visual description we get:

The Zigzag Tower looks like a towering pillar of grandeur that sharply cuts into the sky, with its unique zigzag facade. Its yellow-brown hues blend with its natural surroundings, giving off a sense of harmony with the environment. It is adorned with intricate carvings and sculptures of animals and plants that make it seem to come alive in its own right.

The description doesn’t look that different but the effect is dramatic:

Midjourney - Isometric rendering of a single building on a white background: The Zigzag Tower looks like a towering pillar of grandeur that sharply cuts into the sky, with its unique zigzag facade. Its yellow-brown hues blend with its natural surroundings, giving off a sense of harmony with the environment. It is adorned with intricate carvings and sculptures of animals and plants that make it seem to come alive in its own right.

Describing the style

If you ask for an image of a building that can mean all kinds of things. For instance this is what Stable Diffusion gives for the Jubilant Forge:

jumbled old style drawing of a building

Interesting! But not the format I intended. Here’s some additions to the prompt that help:

  1. Isometric” is a very strong word and will align the perspective and set the camera angle.
  2. Midjourney will happily make a stand-alone building. Dall-E often zooms too far in or gets confused, but it comes close. Stable Diffusion feels hopeless! I’d be curious if Stable Diffusion and Dall-E could be asked to infill a template photo; i.e., create a isometric-shaped-building-size-hole so it has to work in those constraints.
  3. White background” suggests the building should be rendered without an environmental context.

This prompt seems decent for both Midjourney and Dall-E: Isometric rendering of single building on a white background

Conclusion

Many of the lessons from this experiment could be applied to other top-down authoring environments:

  1. Establishing hierarchical context.
  2. Using GPT to offer suggestions at each level with author selection.
  3. Using a combination of natural language and structured output.
  4. Include points of intervention to “speak to” GPT.
  5. Be aware of all the language in a prompt; it all matters.
  6. Use the tool a lot! The first couple things feel magical, but the magic will wear off after you’ve made a couple dozen things without special effort.

If you want to try this yourself check out llm.ianbicking.org, or check out GitHub. If you are curious about the exact prompts look for prompt = in citymakerdb.js. Note that this is a personal project, it’s monolithic and only organized well enough for me to understand.

Similarly: when using the site be warned I have not built it carefully for other people to use, stuff will be weird, errors will appear only in the JS Console, there are no promises. And you’ll have to bring your own GPT API key!

Comments welcome on Mastodon, Twitter.

If you’ve gotten this far I will also throw in here that I (Ian) am looking for a job, and maybe the best job for me is one that I don’t yet know exists. I’m particularly interested in the area of large language models, natural language interfaces, new user interactions built on LLMs (especially their abilities to understand us in new ways). I’m excited about education, aiding in executive function, and human-centered interactions. Let me know if you have ideas, or hit me up on LinkedIn I would appreciate it!



from Hacker News https://ift.tt/qzVvWKi

“Clean” Code, Horrible Performance [video]

Comments

from Hacker News https://www.youtube.com/watch?v=VkillO8yf4Y

The widespread layoffs are more because of copycat behavior than cost-cutting

  • Industries like tech, media, and finance have slashed thousands of jobs in the past few months.
  • Companies have cited an economic downturn and a drop in demand for the job cuts.
  • A Stanford professor says there's another simpler reason: Companies are blindly copying each other.
Loading Something is loading.

Thanks for signing up!

Access your favorite topics in a personalized feed while you're on the go.

This as-told-to essay is based on a conversation with Jeffrey Pfeffer, the Thomas D. Dee II Professor of Organizational Behavior at the Stanford Graduate School of Business. It has been edited for length and clarity.

The idea that human behavior is influenced by what others do is really old. If you're a pedestrian and you see a stop signal, but no cars are coming and somebody steps into the street, you'll probably do it too. It's almost automatic behavior.

We should expect this to also be true in business. A lot of companies were hiring during the pandemic, so everybody decided to hire. Now, companies are laying off, and everybody decided to follow each other and lay people off. A lot of this is just imitation.

Companies don't throw out their capital equipment the minute market turns down. Hiring and firing like this is expensive. First you pay severance, then you go back into the market and pay recruiters and head hunters. You may also pay bonuses to get people to come work for you.

And when the economy turns down, you do this all over again. These are all extra expenses that companies wouldn't incur if they had a long-term idea of how many people they needed instead of hiring and firing with every economic fluctuation. If you think about it, companies are essentially buying high and selling low with their employees, which doesn't make sense.

A lot of companies doing layoffs cite the economic downturn, but many of them aren't going to run out of money if they avoid layoffs. This is a choice.

When people no longer have jobs, their purchasing power and purchasing activity goes down. So these layoffs help create the very economic downturn that they're supposedly protecting against.

The companies also try to justify the layoffs by saying there's been a drop in demand, but you could argue that one of the reasons for that is that all this talk about layoffs has scared everybody. That means fewer companies want to advertise, for example, which affects companies like Meta and Google. So it becomes a self-fulfilling prophecy.

There was a time when companies cut employment only in times of severe economic stringency. But now they've become kind of routine, and there's very little consideration of the harm they cause.

Layoffs have a huge behavioral and physical negative effect on people. So while companies are trying to maintain their margins, they're exacting an enormous human toll.

Layoffs are stressful, and stress leads to a bunch of unhealthy behaviors. People's social identity and friends networks are often tied up with their jobs and where they work. Research has shown layoffs can cause a 15% to 20% increase in death rates for affected workers for the following 20 years, and they can drive the odds of suicide up by two times or more. We as a society will pay for the health consequences of these layoffs.

In many instances, layoffs don't increase stock prices or cut costs. Between things like the cost of severance and the loss of productivity, layoffs have pretty nasty and negative consequences for the company. It's not clear they actually increase profits.

The irony is that these same companies were talking a year ago about people as their most important asset, and now they're treating their employees pretty badly, laying them off via email or by abruptly cutting off their access to the company. These layoffs are a decision that reflects the company's values, and these companies have basically given their employees the middle finger.



from Hacker News https://ift.tt/NCawVXG

Monday, February 27, 2023

pgvector: Open-source vector similarity search for Postgres

pgvector

Open-source vector similarity search for Postgres

CREATE TABLE items (embedding vector(3));
CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops);
SELECT * FROM items ORDER BY embedding <-> '[1,2,3]' LIMIT 5;

Supports L2 distance, inner product, and cosine distance

Build Status

Installation

Compile and install the extension (supports Postgres 11+)

git clone --branch v0.4.0 https://github.com/pgvector/pgvector.git
cd pgvector
make
make install # may need sudo

Then load it in databases where you want to use it

You can also install it with Docker, Homebrew, PGXN, or conda-forge

Getting Started

Create a vector column with 3 dimensions

CREATE TABLE items (embedding vector(3));

Insert values

INSERT INTO items VALUES ('[1,2,3]'), ('[4,5,6]');

Get the nearest neighbor by L2 distance

SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 1;

Also supports inner product (<#>) and cosine distance (<=>)

Note: <#> returns the negative inner product since Postgres only supports ASC order index scans on operators

Indexing

Speed up queries with an approximate index. Add an index for each distance function you want to use.

L2 distance

CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops);

Inner product

CREATE INDEX ON items USING ivfflat (embedding vector_ip_ops);

Cosine distance

CREATE INDEX ON items USING ivfflat (embedding vector_cosine_ops);

Indexes should be created after the table has some data for optimal clustering. Also, unlike typical indexes which only affect performance, you may see different results for queries after adding an approximate index. Vectors with up to 2,000 dimensions can be indexed.

Index Options

Specify the number of inverted lists (100 by default)

CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lists = 100);

A good place to start is 4 * sqrt(rows)

Query Options

Specify the number of probes (1 by default)

A higher value improves recall at the cost of speed.

Use SET LOCAL inside a transaction to set it for a single query

BEGIN;
SET LOCAL ivfflat.probes = 1;
SELECT ...
COMMIT;

Indexing Progress

Check indexing progress with Postgres 12+

SELECT phase, tuples_done, tuples_total FROM pg_stat_progress_create_index;

The phases are:

  1. initializing
  2. performing k-means
  3. sorting tuples
  4. loading tuples

Note: tuples_done and tuples_total are only populated during the loading tuples phase

Partial Indexes

Consider partial indexes for queries with a WHERE clause

SELECT * FROM items WHERE category_id = 123 ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

can be indexed with:

CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WHERE (category_id = 123);

To index many different values of category_id, consider partitioning on category_id.

CREATE TABLE items (embedding vector(3), category_id int) PARTITION BY LIST(category_id);

Performance

To speed up queries without an index, increase max_parallel_workers_per_gather.

SET max_parallel_workers_per_gather = 4;

To speed up queries with an index, increase the number of inverted lists (at the expense of recall).

CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lists = 1000);

Reference

Vector Type

Each vector takes 4 * dimensions + 8 bytes of storage. Each element is a single precision floating-point number (like the real type in Postgres), and all elements must be finite (no NaN, Infinity or -Infinity). Vectors can have up to 16,000 dimensions.

Vector Operators

Operator Description
+ element-wise addition
- element-wise subtraction
<-> Euclidean distance
<#> negative inner product
<=> cosine distance

Vector Functions

Function Description
cosine_distance(vector, vector) → double precision cosine distance
inner_product(vector, vector) → double precision inner product
l2_distance(vector, vector) → double precision Euclidean distance
vector_dims(vector) → integer number of dimensions
vector_norm(vector) → double precision Euclidean norm

Aggregate Functions

Function Description
avg(vector) → vector arithmetic mean

Libraries

Frequently Asked Questions

How many vectors can be stored in a single table?

A non-partitioned table has a limit of 32 TB by default in Postgres. A partitioned table can have thousands of partitions of that size.

Is replication supported?

Yes, pgvector uses the write-ahead log (WAL), which allows for replication and point-in-time recovery.

What if I want to index vectors with more than 2,000 dimensions?

Two things you can try are:

  1. use dimensionality reduction
  2. compile Postgres with a larger block size (./configure --with-blocksize=32) and edit the limit in src/ivfflat.h

Additional Installation Methods

Docker

Get the Docker image with:

docker pull ankane/pgvector

This adds pgvector to the Postgres image (run it the same way).

You can also build the image manually:

git clone --branch v0.4.0 https://github.com/pgvector/pgvector.git
cd pgvector
docker build -t pgvector .

Homebrew

With Homebrew Postgres, you can use:

brew install pgvector/brew/pgvector

PGXN

Install from the PostgreSQL Extension Network with:

conda-forge

Install from conda-forge with:

conda install -c conda-forge pgvector

This method is community-maintained by @mmcauliffe

Hosted Postgres

pgvector is available on these providers.

To request a new extension on other providers:

  • Amazon RDS - follow the instructions on this page
  • Google Cloud SQL - vote or comment on this page
  • DigitalOcean Managed Databases - vote or comment on this page
  • Azure Database - vote or comment on this page

Upgrading

Install the latest version and run:

ALTER EXTENSION vector UPDATE;

Upgrade Notes

0.4.0

If upgrading with Postgres < 13, remove this line from sql/vector--0.3.2--0.4.0.sql:

ALTER TYPE vector SET (STORAGE = extended);

Then run make install and ALTER EXTENSION vector UPDATE;.

0.3.1

If upgrading from 0.2.7 or 0.3.0, recreate all ivfflat indexes after upgrading to ensure all data is indexed.

-- Postgres 12+
REINDEX INDEX CONCURRENTLY index_name;

-- Postgres < 12
CREATE INDEX CONCURRENTLY temp_name ON table USING ivfflat (column opclass);
DROP INDEX CONCURRENTLY index_name;
ALTER INDEX temp_name RENAME TO index_name;

Thanks

Thanks to:

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/pgvector/pgvector.git
cd pgvector
make
make install

To run all tests:

make installcheck        # regression tests
make prove_installcheck  # TAP tests

To run single tests:

make installcheck REGRESS=functions                    # regression test
make prove_installcheck PROVE_TESTS=test/t/001_wal.pl  # TAP test

To enable benchmarking:

make clean && PG_CFLAGS=-DIVFFLAT_BENCH make && make install

Resources for contributors



from Hacker News https://ift.tt/wXgNP7s

Dropping the creator of ‘Dilbert’ is free speech at work

Scott Adams, creator of the once-funny comic strip “Dilbert,” had the right to advise White people to “get the hell away from Black people” — just as the media companies that published Adams’s work had the right to get the hell away from him. That is exactly how free speech is supposed to work.

Adams posted a disgustingly racist rant on YouTube last week, among other things claiming that Black Americans collectively are “a hate group.” By the weekend, hundreds of newspapers (including The Post) announced they were dropping “Dilbert.” And on Sunday, the company that has syndicated the strip, Andrews McMeel Universal, said it was “severing our relationship” with Adams because “we will never support any commentary rooted in discrimination or hate.”

On Monday, Adams tweeted: “My publisher for non-Dilbert books has canceled my upcoming book and the entire backlist. Still no disagreement about my point of view. My book agent canceled me too.”

Fact-check: There is massive disagreement about his “point of view,” which is a noxious stew of anti-Black bias, white nationalism and MAGA grievance-mongering.

One place Adams need not worry about being canceled is Twitter, whose owner, Elon Musk, retweeted a message of support for Adams. Musk added that U.S. media are “racist against whites and Asians” and that the same thing is true of “elite colleges & high schools in America.” Since he bought the social media platform, Musk has made a point of reactivating accounts that had been suspended for racist or white-nationalist speech that violated pre-Musk standards.

Follow Eugene Robinson's opinionsFollow

A billionaire who is smart enough to master rocket science should be able to grasp that free speech is not the same thing as consequence-free speech. The former is guaranteed by the Constitution. The latter is not.

There is no right in this country to say grossly offensive things and expect those who are offended not to react. If Adams failed to understand that before his rhetorical self-immolation, he gets it now. “My reputation for the rest of my life is destroyed,” he said on Saturday, returning his badly burned hand to the red-hot stove that is YouTube. “You can’t come back from this, am I right? There’s no way you can come back from this.”

Not in my book. When I was growing up in South Carolina, there was a segregationist named Maurice Bessinger who adamantly refused to serve African Americans in his chain of barbecue restaurants. He eventually was forced to integrate, but he continued to hand out pro-Confederate and proslavery pamphlets to customers. No one in my family would think of eating his food. It was said to be good barbecue — but we could get good barbecue elsewhere. Why would we give our money to an unrepentant racist?

Actually, it has been a while since I had any reason to think anything Adams drew or wrote was funny. Before last week, he was already well on his way down the “White persecution complex” rabbit hole. Last year, he introduced the “Dilbert” strip’s first Black character, who was hired “to add some diversity to the engineering team.” On his YouTube show, Adams also recently said that “I’ve been identifying as Black” because “I like to be on the winning team.”

This fantasy of Black Americans somehow being a privileged class is hallucinatory — and hilarious, at least to Black folks I know. But it is consequential, too, because it is one of the imagined wrongs that animate the MAGA political movement. There is a direct line between Adams’s rant and the MAGA effort to sanitize and distort the teaching of Black American history, because it is impossible to believe Black people are “the winning team” and at the same time acknowledge the centuries-old fact pattern of slavery, Jim Crow segregation and systemic racism.

Adams, Musk and most ambitious Republican politicians want to pretend that the past is irrelevant to the present, which is absurd. And they grasp at straws to “prove” themselves right. What set off Adams’s tirade about how White Americans should “get the hell away from Black people” was an utterly meaningless Rasmussen “poll” supposedly showing that only a slim majority of Black Americans would agree with the statement, “It’s okay to be white.”

That’s not a finding — it’s a manufactured provocation. “It’s okay to be White” is a phrase known to be used by white-supremacist groups. Even for respondents who were unaware of that, what on Earth does the question mean? Is it okay for anyone to be White? Is it okay for me, as a Black person, to be White? Implicit in the question is having a choice that no one has.

The choice we do have is not to be racist. Buh-bye, Scott Adams.



from Hacker News https://ift.tt/G6TnEtj

FFmpeg 6.0

If you find FFmpeg useful, you are welcome to contribute by donating. More downloading options

Get packages & executable files

FFmpeg only provides source code. Below are some links that provide it already compiled and ready to go.

Linux Packages

Linux Static Builds

Get the Sources

You can retrieve the source code through Git by using the command:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
Cannot access Git or wish to speed up the cloning and reduce the bandwidth usage?

FFmpeg has always been a very experimental and developer-driven project. It is a key component in many multimedia projects and has new features added constantly. Development branch snapshots work really well 99% of the time so people are not afraid to use them.

Git Repositories

Since FFmpeg is developed with Git, multiple repositories from developers and groups of developers are available.

Release Verification

All FFmpeg releases are cryptographically signed with our public PGP key and should be verified for authenticity.

pub   rsa2048 2011-04-26 [SC]
    FCF986EA15E6E293A5644F10B4322F04D67658D8
uid           [  full  ] FFmpeg release signing key <ffmpeg-devel@ffmpeg.org>
sub   rsa2048 2011-04-26 [E]

To verify a release:

  1. Import our public key into your local keyring:
    $ curl https://ffmpeg.org/ffmpeg-devel.asc | gpg --import
  2. Download a release tarball and its corresponding signature.
  3. Verify the signature:
    $ gpg --verify ffmpeg-4.3.2.tar.xz.asc ffmpeg-4.3.2.tar.xz
    gpg: Signature made Sun 21 Feb 2021 06:35:15 AEST
    gpg:                using RSA key FCF986EA15E6E293A5644F10B4322F04D67658D8
    gpg:                issuer "ffmpeg-devel@ffmpeg.org"
    gpg: Good signature from "FFmpeg release signing key <ffmpeg-devel@ffmpeg.org>" [full]

Releases

Approximately every 6 months the FFmpeg project makes a new major release. Between major releases point releases will appear that add important bug fixes but no new features. Note that these releases are intended for distributors and system integrators. Users that wish to compile from source themselves are strongly encouraged to consider using the development branch (see above), this is the only version on which FFmpeg developers actively work. The release branches only cherry pick selected changes from the development branch, which therefore receives much more and much faster bug fixes such as additional features and security patches.

FFmpeg 6.0 "Von Neumann"

6.0 was released on 2023-02-27. It is the latest stable FFmpeg release from the 6.0 release branch, which was cut from master on 2023-02-19.

It includes the following library versions:

libavutil      58.  2.100
libavcodec     60.  3.100
libavformat    60.  3.100
libavdevice    60.  1.100
libavfilter     9.  3.100
libswscale      7.  1.100
libswresample   4. 10.100
libpostproc    57.  1.100

FFmpeg 5.1.2 "Riemann"

5.1.2 was released on 2022-09-25. It is the latest stable FFmpeg release from the 5.1 release branch, which was cut from master on 2022-07-13.

It includes the following library versions:

libavutil      57. 28.100
libavcodec     59. 37.100
libavformat    59. 27.100
libavdevice    59.  7.100
libavfilter     8. 44.100
libswscale      6.  7.100
libswresample   4.  7.100
libpostproc    56.  6.100

FFmpeg 5.0.2 "Lorentz"

5.0.2 was released on 2022-11-04. It is the latest stable FFmpeg release from the 5.0 release branch, which was cut from master on 2022-01-04.

It includes the following library versions:

libavutil      57. 17.100
libavcodec     59. 18.100
libavformat    59. 16.100
libavdevice    59.  4.100
libavfilter     8. 24.100
libswscale      6.  4.100
libswresample   4.  3.100
libpostproc    56.  3.100

FFmpeg 4.4.3 "Rao"

4.4.3 was released on 2022-10-09. It is the latest stable FFmpeg release from the 4.4 release branch, which was cut from master on 2021-04-08.

It includes the following library versions:

libavutil      56. 70.100
libavcodec     58.134.100
libavformat    58. 76.100
libavdevice    58. 13.100
libavfilter     7.110.100
libswscale      5.  9.100
libswresample   3.  9.100
libpostproc    55.  9.100

FFmpeg 4.3.5 "4:3"

4.3.5 was released on 2022-10-10. It is the latest stable FFmpeg release from the 4.3 release branch, which was cut from master on 2020-06-08.

It includes the following library versions:

libavutil      56. 51.100
libavcodec     58. 91.100
libavformat    58. 45.100
libavdevice    58. 10.100
libavfilter     7. 85.100
libswscale      5.  7.100
libswresample   3.  7.100
libpostproc    55.  7.100

FFmpeg 4.2.8 "Ada"

4.2.8 was released on 2022-10-11. It is the latest stable FFmpeg release from the 4.2 release branch, which was cut from master on 2019-07-21.

It includes the following library versions:

libavutil      56. 31.100
libavcodec     58. 54.100
libavformat    58. 29.100
libavdevice    58.  8.100
libavfilter     7. 57.100
libswscale      5.  5.100
libswresample   3.  5.100
libpostproc    55.  5.100

FFmpeg 4.1.10 "al-Khwarizmi"

4.1.10 was released on 2022-10-22. It is the latest stable FFmpeg release from the 4.1 release branch, which was cut from master on 2018-11-02.

It includes the following library versions:

libavutil      56. 22.100
libavcodec     58. 35.100
libavformat    58. 20.100
libavdevice    58.  5.100
libavfilter     7. 40.101
libswscale      5.  3.100
libswresample   3.  3.100
libpostproc    55.  3.100

FFmpeg 3.4.12 "Cantor"

3.4.12 was released on 2022-10-27. It is the latest stable FFmpeg release from the 3.4 release branch, which was cut from master on 2017-10-11.

It includes the following library versions:

libavutil      55. 78.100
libavcodec     57.107.100
libavformat    57. 83.100
libavdevice    57. 10.100
libavfilter     6.107.100
libavresample   3.  7.  0
libswscale      4.  8.100
libswresample   2.  9.100
libpostproc    54.  7.100

FFmpeg 2.8.21 "Feynman"

2.8.21 was released on 2022-10-30. It is the latest stable FFmpeg release from the 2.8 release branch, which was cut from master on 2015-09-05. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2015-08-28, libav 11 as of 2015-08-28.

It includes the following library versions:

libavutil      54. 31.100
libavcodec     56. 60.100
libavformat    56. 40.101
libavdevice    56.  4.100
libavfilter     5. 40.101
libavresample   2.  1.  0
libswscale      3.  1.101
libswresample   1.  2.101
libpostproc    53.  3.100

Old Releases

Older versions are available at the Old Releases page.



from Hacker News https://ift.tt/VRqfkLP

Iconhunt: Search 150.000 free and open source icons

A perfect search engine with 150.000+ free, open sources icons. Use them in Notion, Figma or download them with a single click.



from Hacker News https://ift.tt/28QJlSg

Toy CPU Simulator

This is a DOS game. Download toy.exe to play it on FreeDOS or DOSBox or any other DOS system. Compile the source code using OpenWatcom.

I teach university courses part-time, and one course that I teach is MIS 100, where students learn how technology works. For our section on "programming," I usually talk about programming in very abstract terms, because these are not Computer Science students. But this year, I wanted to try something new.

I hoped to start the "programming" discussion by walking my students through a history of programming, so they could see the next step and how that worked. I tried to find a simple hobby "educational" computer, similar to the Altair 8800, where you input a series of program instructions in "machine language" (binary opcodes) using switches and LEDs. I wanted the instructions to be simple enough that my students could write a few simple programs, like A+B=C, and use that as a starting point to write the same program in Assembly, and in C, and ... you get the idea.

But I couldn't find a suitable "Altair-like" SBC for less than $100. There are "Altair" software emulators out there, but they faithfully reproduce the Altair 8800, and that was too much overhead for my needs.

So I decided to write my own hobby "educational" computer. I call it the Toy CPU.

I wrote a rough prototype on DOS using character mode, but you couldn't enter a program on the "front panel." Instead, you had to hard-code a program into memory, and recompile to run that. It was very primitive, but enough to know that it worked.

Later, I completely rewrote the Toy CPU using Linux ncurses. This was still a prototype, but this time you could enter a program on the "front panel" by "flipping bits." It looked okay in ncurses, but I really wanted a graphical program.

Open Jam 2022 came up at the right time! I decided to completely rewrite the Toy from scratch, using FreeDOS and other open source tools. I don't use graphical assets per se; instead, the Toy draws the interface elements using basic graphical functions from OpenWatcom (open source). If you're curious: I used FED (open source) as my editor. I ran FreeDOS inside VirtualBox (open source) running on top of Fedora Linux (open source). Everything in the pipeline was open source.


The theme for Open Jam 2022 is "Light in the Darkness," which is a perfect fit for the Toy CPU, because of all the blinkenlights!

More information, including opcodes and sample programs you can try out are on my GitHub project.



from Hacker News https://ift.tt/LqVXbKW

Sunday, February 26, 2023

A Brief Hobbyist Primer on Clipping Diodes

A Brief Hobbyist Primer on Clipping Diodes

Blues Breaker Style OverdriveBlues Driver Style OverdriveBoost and OverdriveDistortionDriveDumble Style OverdriveFuzzGuitar Gear Improvements and PrototypesKlone and Transparent OverdriveMarshall Style DistortionOCD Style OverdriveOverdriveRat Style FuzzTubescreamer Style OverdriveVox Style Distortion+-

2020GPXClippingDiodes700.jpg

So this post came about due to my sometimes confusion between Soft and Hard Clipping, Symmetrical and Asymmetrical Clipping and the individual clipping characteristics of different Diodes. In my earliest pedal years I took the type of Diode to be the essential constituent of the clipping degree and texture versus the actual circuit and diodes arrangement. Phrases like ’Soft Clipping Germanium’ also confused me for eons - as it’s actually the methodology which principally defines the nature of the clipping, and in fact Germanium actually clips quite hard by default!

 

So this is largely a crib sheet as such to help me to remember the different fundamentals of Diode Clipping and exactly how they impact on the tone and texture of my favourite pedals’ circuits. I cover this in 5 key sections :

  • Clipping Diode Introduction
  • Soft vs Hard Diode Clipping
  • Symmetrical vs Asymmetrical Clipping
  • Notable Diode Clipping Circuits
  • Notable Diodes and Use

Clipping Diode Introduction

Clipping Diode Introduction

Diodes are unidirectional electrical conductors and part of the Semiconductor family. Clipping Diodes are largely Junction Diodes or P-N Junction Diodes to be precise. They are typically made of Silicon, Germanium or Gallium Arsenide but there are a number of other different types employed too as we shall see.

 

For sake of example here we will be using a Glass Crystal Germanium Type reference roughly similar to a 1N34A. Here we can see all the key constituent parts of the device - copper-wire wrapped Cathode and Anode, the Germanium N-Type Pellet/Crystal with P-Type Impurities Area and the Fine Spring Wire bridging the gap.

 

The polarized Diodes devices act not entirely unlike resistors while they restrict and limit the current flow in one direction only. The nature of how the Positive P-Type and Negative N-Type areas interact results in a somewhat flawed behaviour which sort of triggers a gate-open type mechanic at certain Voltage values and results in some degree of spillover distortion. In fact a degree of capacitance occurs as electrons 'gather' on the P-Type surface until there are sufficient numbers to 'leap' / bridge the gap from the Cathode to the Anode.

 

The sufficient numbers of electrons or voltage threshold here is defined as Forward Voltage (Fv) or Voltage Drop and ranges from a median value of c0.25Vf for Schottky type diodes, through c0.35Vf for Germanium, c0.70Vf for Silicon and c2.0Vf for LEDs. The lower the value of Vf the greater the degree and onset of distortion.

 

Benoit of Coda Effects provides this handy guide :

  • Schottky - Very High Distortion, Maximum Compression
  • Germanium - High Distortion, Significant Compression
  • Silicon - Classic/Standard Overdrive and Distortion - some degree of Compression
  • LED - Very Open and Dynamic Saturation - Least Compression and Distortion

As with anything circuit based - it's how the core component is deployed which really matters - so you can 'soften' the clipping of a Diode by combining it with appropriate value capacitors and resistors, or stack them in series - evens (symmetrical) or odds (asymmetrical). The important takeaway here is that they are an organically functioning unidirectional limiting device whose flawed characteristics - in letting part of the current through are what makes them work for Pedal tone and harmonic texture generation.

 

I will be focusing on the manner of clipping enacted here rather than specific oscilloscope traces and patterns of output / waveforms - that will be for another feature - where I plot circuits by their waveform traces! Here I was somewhat surprised though to find that the softer clipping curves were the ones with more of the peak amplitudes 'lopped' off as such - in somehow producing a very softened/rounded looking almost square wave curve - but obviously with significantly lower amplitudes. What is important here though is therefore the angularity of the output waveforms and how high those peak - in terms of maximum distortion and vice versa.


Soft vs Hard Diode Clipping

Soft vs Hard Diode Clipping

This was initially a large part of my misunderstanding - as it is the actual circuit arrangement and deployment of the Diodes which is critical to the degree of clipping. In that Soft Clipping is achieved by applying the Diodes in the Feedback path / loop of the main tone-generator - typically OpAmp, while Hard Clipping occurs sequentially after the OpAmp and is achieved via routing the Diodes to ground - for maximum impact.

 

Soft Diode Clipping

This creates a more overdrive-like sound than 'Hard' clipping distortion. Two diodes are connected on the feedback-path / loop of an OpAmp or a Transistor. This rounds out the peaks of the signal - i.e. makes it 'softer' and provides a little more tube-like character to the tone. The Ibanez Tube Screamer uses this method as does the Paul Cochrane Timmy, and Hermida Zendrive even to a degree.

 

Hard Diode Clipping

A very common way to create distortion. Two diodes shunted to ground in opposite directions will cut away the peaks of the signal and thus, create distortion. The Boss DS-1, MXR Distortion+ and ProCo Rat are all excellent example of this type - as is actually the Klon Centaur too!


Symmetrical vs Asymmetrical Clipping

Symmetrical vs Asymmetrical Clipping

I always knew the impact of Symmetrical vs Asymmetrical clipping on those pedals which deployed those options, but I wasn't always familiar with the science and arrangement behind it. Generally to my ears Symmetrical Clipping is somewhat smoother, while Asymmetrical Clipping often produces a more textured and more appealing tonality. Say Boss OD-1 (Asymmetrical) vs Ibanez / Maxon 808.

 

Symmetrical Clipping

This occurs when you deploy even pairs of the same Diode in both directions. Most Symmetrical Clipping consists of a single pair of Diodes, while some use two pairs in series - so you have two Diodes on each directional branch / path of the circuit. Deploying two Diodes accumulates the Vf factor and renders a softer clipping. I've not seen many circuits with more than two Diodes per path as obviously you get increasing degrees of output loss too with excessive clipping. The Volume Drop experienced with most types of clipping really helps illustrate the Voltage Drop physics of the electronics. Undoubtedly the archetype for Symmetrical Clippers is the Ibanez / Maxon 808 overdrive.

 

Asymmetrical Clipping

So while Symmetrical usually means deploying even pairs, Asymmetrical means typically employing numerically odd sets or an additional Diode on just one of the directional paths - so you clip the output curve to different degrees north and south of the centre line. In most cases this means Two Diodes on one path vs One Diode in the other direction - while this could also be achieved by using just different Diodes with sufficiently different Vf values. For some reason the latter methodology is not particularly popular - where most go with 2 : 1. Classic Asymmetrical Clippers include the Boss OD-1 and SD-1 overdrives.


Notable Diode Clipping Circuits

Notable Diode Clipping Circuits

Probably the most ubiquitous of all circuits - certainly of the Diode Clipping circuits - you have Ibanez's or Maxon's original green 808 Tube Screamer - with Soft Symmetrical Clipping courtesy of the JNR4558 OpAmp's Feedback Loop - as illustrated above. I took the opportunity to 'place' the very mojo Panasonic MA150 Diodes in situ here, while various iterations of Tube Screamer have variously used a number of different Diodes over the years - including the 1N4148, 1N914, and 1S1588 - all Silicon Diodes around the 0.7Vf mark!

 

Analog.Man King of Tone - Hybrid Dual Channel Symmetrical Soft-Clipping Overdrive which utilises 8 x Panasonic MA856 and 4x Toshiba 1S1588 Diodes on its different gain channels.

 

Boss OD-1 OverDrive - in many ways the forerunner to the Tube Screamer - deploys 1S1588 Diodes in Asymmetrical Soft Clipping arrangement.

 

Boss SD-1 Super OverDrive - a somewhat refinement and evolution of the OD-1 to a degree - Soft Asymmetrical Clipping with 1S2473 Diodes originally, and then IN4148.

 

Boss BD-2 Blues Driver - Hybrid / Hard Clipper - mix of Soft and Hard Symmetrical Clipping across 2 gain stages, uses 1SS133 Diodes and 1N914 Diodes.

 

Boss DS-1 Distortion - Famous Symmetrical Hard-Clipping Distortion uses 2 pairs of 1N4148.

 

Hermida Zendrive / Blues Breaker - The Zendrive actually utilises 2N7000 Mosfets as Symmetrical Soft-Clipping Diodes, while other notable Blues Breaker Circuits use a combination of Mosfets / and / or 1N4148 and BAT41 Diodes typically.

 

Klon Centaur - Notoriously misleading and complex Symmetrical Hard Clipping Overdrive which uses original USA-made 1N34A and D9E diodes. Lots of fakes / counterfeits on the market for these - so beware!

 

MXR Distortion+ - Symmetrical Hard Clipping Distortion which uses a pair of 1N34A Diodes.

 

Paul Cochrane Timmy - Actually at its core a Symmetrical Soft-Clipping Overdrive utilising 1N4148 Diodes, while it does obviously have an Asymmetrical clipping mode too.

 

ProCo Rat *Clipping - Obviously main distortion generator is LM308 type OpAmp and 1N914 Diodes, here I'm also referring to the latter mods for the Rat really - including the Dirty Rat's Germanium 1N34A Diodes and the now ubiquitous Turbo Rat's Two Red LEDs!

 

 


Clipping Diodes by Type with Typical Forward Voltage Ratings (Vf)

Clipping Diodes by Type with Typical Forward Voltage Ratings (Vf)

When I set off down this route I didn't expect this to become quite so complicated so quick. Frankly I find Transistors much easier to deal with. Turns out that Clipping Diodes have that exact same Mojo as Transformers where the 'authentic' original components used are the most sought-after but are in the shortest supply. Much the same as with Transistors many of these are now discontinued and out of production - while the market has been flooded with counterfeits as such - or near-looking equivalents which really aren't the same thing.

 

As with all mojo parts there are flaws and inconsistencies in the manufacturing process - as well as in the core function of these devices - so two from the same batch may be significantly different. That said you don't seem to have quite the same degree of quality variation as you do with Transistors.

 

Largely though the same approach applies here - where you really need to know the provenance of whom you're buying from - or it's unlikely to be the part you think it is. There are still lots of suitable alternatives in most guises - but certain mojo parts will still generate a richer, more harmonic and overall more appealing sound. Diodes are tempered by Capacitors and Resistors - and placing further ones in series. So there's lots of different ways you can deploy and 'tune' your Diodes. Finding exactly the right ones though can still be a struggle for some applications. And for many there are finite dwindling resources available! Exactly as per Transistors each Moho Diode needs to be inspected, measured and indexed individually.

 

Note that many Clipping Diodes have very little by way of official brand markers - while it's similar to the mojo Transistors - in that normally it's the local time-appropriate brands native to the original pedals which are considered the most authentic. So for Japanese pedals we're talking Pansonic and Toshiba, Gernany's Telefunken produced some excellent Germanium type Diodes, while for USA it's brands like NTE and Solid State. Obviously NOS Germanium Diodes - like their Transistor equivalents are very much on the point of unobtanium right now!


Schottky Silicon Diodes

Typical Forward Voltage - c0.25Vf

 

These specially engineered Silicon Diodes - named after German physicist Walter H. Schottky - were created to closely match Germanium Diode tolerances - and in fact go further - as these have typically the lowest rated Vf values - or as little as 0.15Vf in some instances. Note that these typically generate Very High Distortion with Maximum Compression - meaning they are often deployed serially in pairs to 'soften' their attack.

  • BAT41 (0.36Vf) - Grey Matter, Zendrive
  • BAT46 (0.25Vf)
  • BAT48 (0.30Vf)
  • BAT54 (0.32Vf)
  • 1N5817 (0.25Vf)
  • 1N5819 (0.26Vf)

Germanium Diodes

Typical Forward Voltage - 0.35Vf

 

Actually the most famous of the 'Hard Clipper' Diodes as seen and for their use on Distortion+ and Rat pedals in particular - but also the Klon Centaur. Germanium Clipping Diodes typically generate High Distortion with Significant Compression.

  • AA116 (0.32Vf)
  • AA138 (0.32Vf)
  • AA143 (0.33Vf)
  • D9E (0.257Vf) - Klon
  • 1N34A (0.21Vf) - Distortion+, Klon, Rat
  • 1N60P (0.33Vf)
  • 1N270 (0.268Vf) - Grey Matter
  • 1N276 (0.35Vf)
  • 1N277 (0.37Vf)

Silicon Diodes

Typical Forward Voltage - c0.70Vf

 

These are generally rather tiny devices although split into Small Signal Diodes, and slightly bigger Power Diodes. You can see by how close the copper-wound Anodes and Cathodes are to the glass shell exteriors compared to the Germanium Diode equivalents which are many times the size of these tiny Silicon Diodes - I have pictured them at the same size for purely visual comparative purposes for their internal component parts. These obviously form the mainstay of Clipping Diodes as we know them and are core to many of our favourite Soft Clipping Overdrives. Silicon generally provides moderate degrees of Clipping Distortion with fairly Minimal Compression.

  • 1N4001 (0.45Vf)
  • 1N414 (0.62Vf) - DS-1
  • 1N4148 (0.68Vf) - Blues Breaker, DS-1, Timmy, TS808
  • 1N4448 (0.62Vf) - Rat
  • 1N4733A (0.78Vf)
  • 1N914 (0.68Vf) - Blues Driver, Rat, TS808
  • 1N916 (0.63Vf) - Rat
  • 1S1588 (0.571Vf)- KOT, OD-1, TS808
  • 1S2473 (0.67Vf)- OD-1, SD01
  • 1SS133 (0.65Vf) - Blues Driver
  • MA150 (0.70Vf) - TS808
  • MA856 (0.685Vf) - KOT

LED Diodes

Typical Forward Voltage - 1.2 > 4.0Vf

 

Obviously the ubiquitous 2 Red LEDs is well known here - being around 1.7Vf - but LEDs can range to at least twice that across the spectrum. Not all bulbs have tonally unique Vf signatures - and there are many variations within Hue and type which yield significant difference. I'm very familiar with this courtesy of a number of my Rat Pedals, but a also Redbeard Effects' Red Mist MKIV Distortion and Kuro Custom Audio's P.h.A. Overdrive most recently. The higher Vf range of LEDs produces Very Open and Dynamic Saturation accompanied by the Least amount of Compression and Distortion overall of any of these Clipping Diode Types. The way how LED clipping onset happens rather late in the gain cycle and ever so smoothly is very well used in all these pedals. This is a great organic and subtle way to apply additional saturation to most circuits.

  • Infra Red (1.2Vf)
  • Red (1.7Vf) - P.h.A., Red Mist, Rat
  • Orange (2.0Vf)
  • Yellow (2.1Vf)
  • Green (2.2Vf)
  • Blue (3.2Vf)
  • White (3.3Vf)
  • Pink (3.3Vf)
  • Purple (3.3Vf)
  • Aqua (3.4Vf)
  • Ultra Violet (3.8Vf)

FET / JFET / MOSFET Transistors as Clipping Diodes

Typical Forward Voltage c0.70Vf

 

FETs of various types can be used as Clipping Diodes too to a degree - like in the Hermida Zendrive. Their Vf range is pretty similar to core Silicon, while the texture of distortion is somewhat softer in many ways. By and large the use of these can be seen as relatively similar in impact to Silicon variants.

 

BS170 (0.581Vf)
2N5457 (0.696Vf)
2N7000 (0.600Vf) Fulltone OCD, Hermida Zendrive


Germanium Transistors as Clipping Diodes

Typical Forward Voltage c0.19Vf

 

Transistors can similarly be deployed as Clipping Diodes in certain circumstances - and these generally give you an unprecedented degree of harmonic texture - Distortion and Compression wise - these are very close to the Schottky varieties - with slightly different character though.

 

AC128 (0.19Vf)
OC44 (0.16Vf)
2N527 (0.19Vf)


Nanolog Molecular Diodes

These likely came to most people's attentions courtesy of Dr Scientists's Heisenberg Molecular Overdrive - now discontinued - but the legend is carried forward in Nanolog's own Carbon Series Classic Overdrive which mixes up 4 clipping varieties - Germanium, Silicon - and it's own N1 and N2 Molecular Junction Devices.

 

An entirely new technology which achieves the core Diode function via Layers of Carbon molecules - between 1 and 10 nanometers thick. These render somewhat more controllable and evenly balanced Vf curves - albeit Forward Voltage rates are not quoted here for some reason. There are currently 3 Nanolog Molecular Diode Devices - simply named N1 to N3 - and described as follows:

  • N1 - The most saturated/compressed of the three. Use this if the goal is to get a similar sound to silicon or germanium but with improved dynamics and clarity
  • N2 - The most popular option. Great dynamic range and warm/natural compression. Perhaps the most 'tube-like' in the right circuit
  • N3 - The most headroom. Huge dynamic range, rich low end, and overall powerful presence

General Advisory and References

This is very much a 'hobbyist' guide in that I've not taken it upon myself to measure independently and verify all the Vf figures I'm quoting here - these are simply derived from a variety of key resources on the web. This is your basic 101 guide to Diodes and I wrote this largely for my own purposes - in order to have some sort of handy record and reference to Clipping Diodes as I do occasionally still get confused! Reader discretion advised!

 

I found the following resources particularly handy :

I also scoured hundreds of different message board threads and other web references for details - far too many and far too fragmented to report here!

 

I hope that some of you might find some of this useful!



from Hacker News https://ift.tt/9JfISk6