Short story: “Death”, “Hat”, “Gene”

Sasaki knew nothing would change if she begged for help. She had been there. Weak kids had weak parents who would blame their own child to appease the other kid’s parents. Her parents were weak but she was not. Thus, when Sasaki broke the glass with her satchel and waved a glass fragment at the bullies, she received no sympathy.

There was no such a thing as self-defense in schools. In a fight, there would be no victims. All parties were equally at fault. She knew the consequences and she accepted them. A week before, the idea would have been unfathomable and yet there she was, clutching a bloody shard in her bare hand, watching her classmates backing off as she walked through.

At that moment, her only thought was to kill the other girls and in the end, she only managed to stab her teacher who was trying to stop her.

The police took her into custody. There were no barred cells for children of her age, there were no steel handcuffs. She was attended by a female officer and the worst restraint she had to endure was from a zip tie; even this was only for a brief time between transits. The police and the schools were being courteous, so she heard. They took every measure to cover up the incident.

The police brought in a psychiatrist to assist in the case. The man was twice as tall as she was and he wore thick beards with a pair of round glasses. There was a white-and-pink scarf wrapped around his head. From head to toe, the man was Arabian and he appeared to speak fluent Japanese. He introduced himself as Abu-Jamal, Mahmud Al-Alem Saifu Abu-Jamal upon her insistence.

Their conversation were not without conditions; the first of which was that he must answer one of her questions for every question he wanted answer, second was that he  not overstep his boundaries. “Sasaki-chan” was fine for her but not “Aiko” or “Aiko-chan”, and in exchange, she would call him “Abujama” as he insisted; by his given name and not his doctor title. And the third, she licked her dry lips.

“I’m thirsty…”

Abu-Jamal chuckled. “Well, me too, Sasaki-chan. Do you want orange or peach juice?”

“Milk!” she perked up on her feet, “Milk with sugar, please”, she said.

They were off to a good start. The Arabian got her talking about her family. She had an elder sister, a mother and a father–a more normal family than her actions that day would have suggested. They were all alive and well, she emphasized, but sometimes, she wished they were not.

“Why? Why do you hate them so much?” Abu-Jamal asked.

At this question, she shrank and looked down at her bandaged hands. The answer came under her breath: “They are unfair.”

It was then that Abu-Jamal noticed something unusual about her way of speaking.

“Say, how old are you, Sasaki-chan?”

“Don’t you already know?”

“Just want to hear it from you directly. After this, you can ask me anything.”

“Fourteen. It’s fourteen. And I don’t have any questions for now.”

She averted her eyes from his gaze.

“Am I making you uncomfortable?”

She hesitated. She opened her mouth for an instance then chose to close it and had a better thought of the answer. Finally, she spoke up:

“No, not in particular.”

“You are a good liar, Sasaki-chan, but hesitance can be as telling as silence.”

Following this, he raised a few questions regarding the girls who picked on her, as well as the teacher. But, the conversation had reached the point where she no longer wanted to participate. Then, he stood up and excused himself.

Her father heard of the event.

For this, her father slapped her. They went through a heated argument which concluded with her flinging her satchel at him, missing his face and hitting the family’s altar. The photo of her mother fell to the floor and cracked. Both of them froze at the instance; their faces twisted in agony. Afterward, she bolted out of the house and ran, and ran.


She ran into Abu-Jamal.


“That’s no good, Sasaki-chan. It’s Abu-Jamal. Oh my…your noses are running–he produced a handkerchief and gently wiped her tears–Tell me what happened.”

Perhaps it was the expectation that the psychiatrist could give her the approval she sought, Sasaki spoke at length how she had been picked on for her fear of sharp things, her anemia and nonstop bleeding, how her father had not been as supportive to her as he had been to her sister, and how powerless she had been.

“Had I not been born…”

The words caught in her throat.

“That’s hardly true, Sasaki-chan. It takes great courage to give one’s life for another. You are a smart girl, Sasaki-chan, can you be as unfair as casting away the life she has given you so easily?”

“B-But…I didn’t ask for this.”

“Indeed, Sasaki-chan. It is unfair to be given something you didn’t ask for and to be demanded gratitude in return. And beside…”

It was then that he took the white-and-pink scarf from his head and put it on hers.

“This is a hat called pagri, Sasaki-chan. It is a symbol of honor and respect in our religion and receiving one means you’re an important guest and that you’re welcome.”

He too was very unfair.

“But I–”

At that instance, she caught his downcast eyes. Was this the right thing to do? Listening to his sigh and seeing him folding the handkerchief and putting it into his pocket, she made up her mind and bowed her head.

“I’m sorry. Thank you.”

“It’s slow, Sasaki-chan. Remember, hesitance can be as telling as silence. So, which one makes you feel better? Before or after you say “thank you”?”


This time, she managed to reply without hesitation.

“That’s right, Sasaki-chan. You turned your fear and your weakness into your greatest weapons. I dare say the girls you tried to kill the other day have learned to fear sharp things and blood a little bit more than you do now.”

She grinned and nodded.

“Not that I would recommend you do this sort of things everyday but, surely, you can turn a little unfairness in this world to your advantage too, can’t you?”

She nodded again.

Madmud Al-Alem Saifu Abu-Jamal had a secret. So did Sasaki Aiko.

After their conversation on the street, the man returned her to her home. She did not know what they were discussing in English but it appeared he managed to persuade her father to forgive her. She was afraid her father was only pretending in front of a guest to save face but even after the Arabian had left, he did not turn on her. He merely gestured at the kitchen; a sign that dinner was in the microwave.

It was rice balls again; it was always rice balls from the convenience store.

The next day, Abu-Jamal came by early in the morning. He asked her to put on her black-and-white sailor uniform even though she had no class all day–she had been suspended for a week.

“Your father and I have been discussing about transferring you to a new school. We have a few options on the table. I want you to see the schools for yourself and tell me which one you like best. Isn’t it right, Sasaki-san?”

Her father quietly nodded, confirming the story. Then, he knelt down on one knee and hugged her. “Remember, Aiko. No matter where you go, no matter what you do, I’ll always love you.”

“Eh…ah…thank you, dad. I’ll see you again tonight, right?”

“Yeah, I’ll cook something good for you tonight”, he answered, patting her head.

Once they were on the road, Abu-Jamal let out a sigh and remarked.

“You still have much to learn, Sasaki-chan.”

She smiled the bravest smile she could put up.

“You are a good liar too, Abujama-san. But, dad is nothing like you.”

“It’s okay to cry when hurt, Sasaki-chan. It’s a perk of girls at your age.”

And she did make good use of that perk. Abu-Jamal’s words had been full of deception and unfairness but they were ones she could not help but let herself be deceived.

Their destination was Fukuoka Prefecture, home to Kyushu University Hospital. A group of scientists there were researching a cure for hemophilia–a genetic disorder that leads to nonstop bleeding–and they needed her assistance. She was far too young to understand the finer points of genetics but one thing she could understand: she was exceedingly unfortunate to be born with hemophilia.

The chance for females to be afflicted with the condition is one-in-twenty-five-million. When she hit puberty, hemophilia could lead to fatal internal bleeding during periods if not discovered and properly taken care of. The earlier she started the treatment, the lower the chance of incurring long-term health risks.

“That’s not all, Sasaki-chan. I’m inclined to believe you’re also–ah, never mind.”

“I am also what? Tell me, tell me!”

“Now, now, I can’t give any spoiler, can I? You’ll have to figure out yourself if you want to be a great heroine.”

“So…am I a psychic? A blood wizard?”

The man laughed. Rubbing her hair and putting the white-and-pink pagri from her hands on her small head, he said:

“We’ll test that too but, don’t hold your breath just yet.”

“Now that we’re so much closer, can I call you Abujama?”

“At home–ehem, at the new home, you can call me Abujama, Yama, Abu, whatever suits you. Though here, you should call me Dr. Mahmud.”

“Can I have milk with sugar, Dr. Mamu…Mamudu?”

“Sure you can, Aiko.”


Highlight: Summer 2017 anime season

“Just as I was getting complacent, you reminded me that I still want to improve” — Kagami Kou

It’s been a long summer indeed.

Much to my dismay (or pleasure), I have the longest and most well-rounded selection ever this season. The new Owarimonogatari anime looks great as always though too much spoilers from the novel ruined it for me. On the list of things that were “ruined by spoilers” this season were New Game!! and Fate Apocrypha, though they both escaped the fate in very different manners.

I haven’t touched New Game‘s manga since the spin-off and thus it remains salvageable. It is the highlight this season so I will save all my praises for later. As for Fate Apocrypha, A-1 Pictures messed up its directing is so badly that the spoilers couldn’t possibly make it worse. That’s just the normal flippant A-1 Pictures for you.

Among some of the more notable shows this season, there are two kinds of shows: the clever kind and the straightforward kind. The clever kinds are Sagrada Reset and Kakegurui; they have the smartest, most convoluted riddles and solutions ever. They emphasize the mystery element and keep the audience thinking about the solution; sort of like Spice and Wolf or Death Note.

On the other hand, straightforward shows like Made in Abyss, Boku no Hero Academia and Princess Principal have their own appeals too. For Made in Abyss, it is the loom of classic Lovecraftian horror in play. For Princess Principal, it is the Steampunk espionage premise (less Joker Game and more Totally Spies!). And for HeroAca…the combat is just awesome to watch.

There’s also Kantai Collection the movie but I shall not acknowledge its existence.

Show Expectation Rating
New Game!! Cash cow Highlight (1)
Tsurezure Children Star Highlight (2)
Sagrada Reset Star Decent
Owarimonogatari Cash cow Decent
Made in Abyss Question mark Decent
Kakegurui Question mark Decent
Boku no Hero Academia Cash cow Decent
Centaur no Nayami Question mark Decent
Koi to Uso Question mark Decent
Isekai Shokudo Question mark Decent
Princess Principal Star Decent
Fate Apocrypha Cash cow Decent (Pending)
Isekai wa Smartphone to Tomo ni Old dog Mediocre
Vatican Kiseki Chousakan Question mark Mediocre
Re-Creators Star Mediocre
Konbini Kareshi Star Mediocre
Jikan no Shihaisha Old dog Nope
Youkai Apartment no Yuuga na Nichijou Old dog Nope
Saiyuki Reload Blast Old dog Nope

New Game!! is an anime about cute girls doing cute office drama. The story revolves around a fresh-from-school game artist Suzukaze Aoba and her daily mishaps at a game development studio. At first glance, it appears to be a slice of life, comedy show stacked with moe elements; in other words, the sitcom of anime world. But, a dumb slice of life comedy show wouldn’t make the highlight, New Game!! is more than that.

For the uninitiated, this is the second season of the series. The first season, New Game! (with one exclamation mark), was ranked #7 in 13 shows last summer and I was clearly less than impressed by it. The first season follows Aoba’s greenhorn days in the company whereas the second season follows her interaction, now from a senior’s point of view, with the newcomers. Her growth and change of perspective is reminiscent of that of Yakumo the Eighth in Rakugo Shinjuu. There are rebellious youngsters, there are complacence from the elders, and there are also tearful farewells. However, that’s where the similarity ends.

New Game!! tries to show as many points of views to any given human conflicts in the workplace as it could and as simple and as complete as possible. Then, it gives solutions, ones that are noble, ones that are positive but ones not everyone has the courage (or bipartisanship) to take. It preaches humility, self-improvement and initiative to both the newcomers and the incumbents. It masterfully exposes toxic situations in the modern workplace and how to defuse them.

New Game!! snapshot
You know, girl, you can’t fight nepotism like that. Been there, done that.

The strength of this show lies in its ability to reflect the audience. I could not help but see myself in Narumi, Yagami and Aoba’s shoes at some points in my career. In particular, watching Narumi lashing out at Nene is like seeing my muddy face in the mirror for the first time and hating it. It is shameful, eye-opening, and I’m grateful for it.

I absolutely recommend this show for anyone who have had at least some experiences working in an office before. A show is the best when it is relatable after all. The comedy element is also on point, played as setup for more serious moments and never to undermine them. This, I feel is a big improvement from Doga Kobo studio’s previous highlighted show: Plastic Memories. They are doing very well for a (relatively) new studio and I can expect great things from them in the future.

Finally, as a post script, the bear cannibals killed me.

Somebody, fund PECO please!


Tsurezure Children took this season by storm. It’s everyone’s favorite indeed. The show definitely deserves the highlight but the lack of focus and the short plot’s length makes it inferior to New Game!! in the final selection.

The show features romantic and comedic shorts from several student couples in rotation. It did a magnificent feat showcasing their personalities and telling their stories in a minute or two. Every second of the show is silly, hilarious, surprising, heart-warming, frustrating, melancholic and endearing at the same time. It plays with the audience’s emotions and it does so masterfully.

Adorable, stoic, bold and emotionally insecure character. Can I keep her?

The greatest strength and also the greatest weakness of Tsurezure Children is its episodic and anthological format. Having so many couples, so many colorful personalities sharing the limelight means there is bound to be a favorite for everyone. Nevertheless, it also means there will be little time to explore these characters in any depth.It is a buffet of appetizers, as tasty as the meal might be, it could never fill anyone’s belly.

Even then, I believe it might have been inappropriate to stretch the stories longer than they are. Romance, like candy, is the sweetest on the first bite and the sour aftertaste is an essential part of the experience. Evidently, the impact of later episodes felt much less to my liking than the earlier ones; especially when the couples started to mingle. I feel having more than one couple on screen took away too much attention from the short’s central couple; thus weakening the short considerably.

Regardless of criticisms, the show manages to hold on quite well all the way to the end. I definitely recommend Tsurezure Children for romance seekers and comedy lovers alike.


Konbini Kareshi is a poor imitation of last season’s hit Tsuki ga Kirei. It has many strong elements of Tsuki ga Kirei that I mentioned in the last season’s review: “Show, don’t tell” storytelling, realistic character design, natural conversations, fantastic soundtrack, etc. But, like Fate Apocrypha, it suffered from a number of directing and visual issues.

On the directing part, some scenes, especially the dialogues in front of the convenience store, could have used better camera angles and cuts. The scene where Honda rushes to Mihashi’s side lacks energy and emotion; in contrast to a similar scene in Tsuki ga Kirei; due to disruptive cuts and poor camera placement. If anything, these are the climatic scenes where they should have gone all out with lighting effects, glows and whatnot, but they didn’t. They didn’t do that in any of the important scenes. Every scene is the same: plain, dull and unremarkable moving sketches.

There are too many still shots in the show that Konbini Kareshi made SHAFT’s powerpoint anime Bakemonogatari look rich in comparison. At the same time, there is too much time wasted on scenes that add nothing to the overall narrative; lunch scenes, walking scenes, sitting in the dark scenes, door opening scenes, swimming scenes, buying scenes, putting things in the fridge scenes, and so on and so forth.

What happened to Chekhov’s gun principle?

The visual is less than impressive, basic strokes and one shading tone, and the animation is jerking as though everyone has Parkinson. This show is so bad on all the technicalities that it makes Isekai wa Smartphone to Tomo ni look good in comparison. And I actually enjoyed Isekai wa Smartphone to Tomo ni a lot more despite its cornier premise.

The story here is good, though, so at least I should seek out the novel and give it a try.

Memo: Phase-locked loop

Phased-lock loop (PLL) synchronizes the frequency of output and input signals. The output signal is generated internally as part of the phased-lock loop; specifically from its variable-frequency oscillator (VFO).

PLL applications

PLLs are primary used for clock synchronization within IC packages, encompassing the whole or parts of the IC’s (signal processing) circuitry within its loop in place of the VFO (though the IC’s circuitry itself normally contains a clock source, crystal or otherwise, within it). This eliminates race conditions between the inputs and outputs of the said circuit.

PLLs are also used for demodulation; e.g., in a radio receiver for both AM and FM signals.

Finally, they are used in frequency synthesis. Frequency synthesizers create multiple frequencies based on the divider value in the feedback loop and the reference frequency (from master oscillator, normally a quartz crystal). This allows very high frequencies or very low frequencies to be generated from one crystal source.

Block diagram of common PLL synthesizer

This type of synthesizer, however, cannot operate over a very wide frequency range as the comparator will have a limited bandwidth and may suffer from aliasing problems.

PLL construction

A simple PLL consists of a phase detector, a loop filter and a VFO. In analog or linear PLL (see, these basic components correspond to:

Analog multiplier as Phase detector

Passive or Active low-pass filter as Loop filter

Voltage-controlled oscillator, which falls under analog VFO category.

One implementation of analog PLL is as follow:

Phase-locked loop circuit
Analog PLL circuit

The specific values of these components are not easy to determine via trial and error. They are often determined via modeling and simulation. In practice, it is usually easier to just buy an off-the-shelf PLL chip than trying to construct one.

Read more

Phase Locked Loop Tutorial (Youtube)


Memo: Analog multiplier and voltage-controlled circuits

Analog multipliers are commonly available as integrated circuits (IC) and are rarely constructed from scratch due to their complexity. Multipliers commonly have 8 pin outs: X1, X2, Y1, Y2, W, Z, +VCC, -VCC. The common AD632 and MPY634 devices consist of one feedback line (W), two ground lines (X2, Y2), two supply lines (+VCC, -VCC) and one amplification factor line (Z); although the configuration might vary from model to model.

Image result for analog multiplier pinout
Always check the datasheet first.
Multiplier in signal processing

Analog multipliers allow the engineer to perform amplitude modulation (AM) techniques; that is, the encoding of one signal as the shape of another signal of a different (higher) frequency. In such applications, the multipliers are used for tweaking the gain by controlling the voltage of one input, effectively turning the multiplier into a voltage-controlled amplifier.

While all multipliers are voltage-controlled amplifiers, not all voltage-controlled amplifiers are true analog multipliers.

When used in conjunction with low-pass filters (and integrators in specific), analog multipliers enable phase detection, and in turn, set the foundation for frequency modulation (FM) techniques; ergo, the encoding of one signal as the frequency variation of another signal of a different amplitude.

An important note for modulation setups is that, the carrier signal will always be the one with higher frequency in AM circuits while the carrier signal in FM circuits will be the one with lower frequency [citation needed!].

Phase detector

Cascading a multiplier into a low-pass filter results in a phase detector. A phase detector detects the difference in phase between two input signals. When the phase is 90 degree, the output goes to 0 and this information can be used in self-tuning circuits.

Because the output signal can receive amplifications beyond what is suitable for tuning circuits, the output is often scaled down via a voltage divider circuit before it can be used as a control signal.

Beyond self-tuning circuits, phase detectors also find applications in phase locked loops, demodulators, radars and servo controllers.

Self-tuned filters

Specifically for the second order universal active filter circuit (conglomerate filter) from the last memo, adding a multiplier to the feedback loops of two integrators turns the entire circuit into a Voltage-Controlled Filter (or Voltage-Controlled Phase Generator).

Self-tuned universal filter circuit
Self-tuned second order universal filter

The above circuit synchronizes the outputs of all four filters’ signals to be in-phase with each other and with the input signal, effectively eliminating race conditions and the likes.

In spite of the name, the circuit itself still requires manual adjustment of the voltage divider after the phase detector (before the control signal). The amplitude of the control signal appears to influence the effective frequency band of the tuner; ergo, the range of input frequencies that the tuner can “lock on”.

Only some amplitudes are usable in reality as a minute change to the control signal’s peak-to-peak voltage can cause this effective frequency band to shift to god-know-where (possibly beyond the measurement limits of the oscilloscope or cut-off thresholds of op-amps in the circuit).

Voltage-controlled oscillator (FM generator)

Like the phase detector, a voltage-controlled oscillator is essential in phase-locked loop‘s construction. Cascading a multiplier into the (inverting) input of an integrator allows the saw-tooth pattern output to vary in frequency (frequency modulated). In voltage-controlled relaxation oscillators, the oscillation is then provided by the Schmitt Trigger via its positive feedback.

Voltage-controlled relaxation oscillator

While not covered by this course, harmonic oscillators can be made voltage-controllable in a similar fashion. They are constructed from a feedback network with L-C elements / R-C elements / crystal which provide the oscillation, an amplifier to keep the signal leveled. Harmonic oscillators are linear and produce sinusoidal waveform. Making a harmonic oscillator voltage-controllable (frequency-wise) is as simple as throwing a multiplier before the primary integrative component of its feedback network (the capacitor or op-amp integrator).

However, unlike non-linear relaxation oscillators, it can become difficult to maintain the sinusoidal shape of the output with a multiplier messing up the integrator’s input.

The circuit for a function generator and a voltage-controlled oscillator (FM generator) is basically the same. The difference lies in the input Vc of the multiplier.

A function generator converts AC input signal and modifies it using separate circuits to produce various waveform.

On the other hand, an oscillator does NOT need AC input to work. It only needs DC supply and uses positive feedback to generate various waveform.

Assuming the hypothesis in the first section of this memo holds true, placing a multiplier at the outputs (saw-tooth output of the integrator or square output of the Schmitt trigger) and outside of the feedback loops will allows amplitude modulation of the output signal and an external signal [citation needed!].

Bonus: Electronic noise in recursive analog circuits

The transient operation of an oscillator highlights a key difference between analog and digital electronics. In analog electronics, the electrical noise is never completely suppressed and it can be used in kick starting oscillations.

“When the power supply to the amplifier is first switched on, electronic noise in the circuit provides a non-zero signal to get oscillations started. The noise travels around the loop and is amplified and filtered until very quickly it converges on a sine wave at a single frequency.” — Wikipedia.

This also explains the existence of conglomerate filters and similar recursive circuits that have no apparent starting or ending point.

Read more

Phase Locked Loop Tutorial (Youtube)


Memo: Active frequency filters

Frequency filters attenuate signals outside its band-pass thresholds. There are two flavors of frequency filters: active and passive. Active filters have op-amps and offer amplification, as well as impedance matching functionality, of the output signal. Passive filters are simple R-C-L networks without any op-amp.

Band-pass and Band-stop construction

Band-pass filter is defined as follow:

band-pass filter is a device that passes frequencies within a certain range and rejects (attenuates) frequencies outside that range.

Band-stop filter is the opposite of Band-pass filter.

Both band-pass and band-stop filters can be created from low-pass and high-pass filters via the corresponding arrangement as shown below:

band stop filter configuration
Band-stop filter construction: Summing low-pass and high-pass filter
band pass filter design
Band-pass filter construction: cascading low-pass and high-pass filter

On a related note, there exists a special form of band-stop filter called notch filter and it is defined as follow:

notch filter is a band-stop filter with a narrow stopband (high Q factor).

with Q factor is, in turned, defined as:

The Q-factor is the reciprocal of the fractional bandwidth. A high-Q filter will have a narrow passband and a low-Q filter will have a wide passband. These are respectively referred to as narrow-band and wide-band filters.

Frequency filters conversion

There are a total of four frequency filters and they can be combined with other electronics and one another to create a new filter. Their second order relationships are described by the following equations:

(1) Low-pass filter = ∫(Band-pass filter)

(2) Band-stop filter = X(t) – Band-pass filter

(3) Band-pass filter = ∫(High-pass filter)

For first order systems, derivations from Band-stop and Band-pass constructions permit the following:

(4) High-pass filter = Low-pass filter – Band-stop filter

(5) Band-pass filter = Low-pass filter (High-pass filter)

IMPOTANT: Anything that works in first order also works in second order.

First order active filters

For the first order filters, a resistor and capacitor bridge is employed. The use of feedback eliminates the need for inductors as used in first order passive filters.

Low-pass filter has the resistor near the source while high-pass filter has the capacitor. In high-pass filters, a small resistor might be included between the source and the capacitor to prevent overloading the capacitor.

Non-inverting low-pass filter
Non-inverting high-pass filter

The difference between inverting and non-inverting filters is the input terminal the input source is connected to. If Vin is connected to the inverting terminal, it’s an inverting filter.

Inverting low-pass filter
Inverting high-pass filter

In any cases, the feedback should always be negative for filters and amplifiers alike. Positive feedback will result in hysteresis circuits (Schmitt triggers).

Second order active filters

Second order filters offer more drastic attenuation (steep roll-off). The simplest kinds are based off Sallen-Key topology

Generic Sallen-Key topology

Second order filters are designed around a non-inverting amplifier with equal resistor and capacitor values. The specific values are determined by the cut-off frequency desired by the designer. As with first-order filters, low-pass filters have a resistor near the source and high-pass filters have a capacitor.

second order low pass filter
Second order active low-pass filter
second order high pass filter
Second order active high-pass filter
Second order universal active filter (Conglomerate filters)

The all the filters above are “section”, meaning, they standalone and are not dependent on any other filters. The opposite of section filters are “conglomerate” filters. Every component of the conglomerate filter must be in order for the entire filter to work correctly. They offer reduced circuitry at the cost of reliability due to high dependency on other components of the system.

At the core, the universal filter is one such conglomerate. Each output of the four op-amps provides a different second order filter behavior:


2nd order high-pass filter

Band-pass filter

2nd order low-pass filter

The universal filter is based on cascading two inverting amplifiers blocks and two inverting integrators blocks with additional, second order feedback loops from each integrator back to the input of the amplifier furthest from it.

Second order universal active filter circuit

Tow-Thomas biquad filter is another conglomerate filter offering low-pass and band-pass characteristics depending on where the input is taken.

Read more (Passive low pass) (Passive high pass) (Passive band pass) (Active low pass) (Active high pass) (Active band pass)

Windows Phone’s music player error 8007003 fix

Some people are still getting this in 2017 and myself included. There are a few possible causes to this issue. I have narrowed down the list of likely culprits as follow:

The song itself can be corrupted.

The song can be in the wrong format.

There exists a duplicate of the song somewhere in Phone memory and SD card.

There exists a glitched object reference to a copy of the song stored in the cloud.

Path length of the file / scan depth limit.

Corrupted files

The first cause can be tested easily using “File” explorer app or another music player. If the song can be played at all then the file (at least its content) is not corrupted. In the event this is indeed the problem, replace the song with a fresh copy (playable on a different device) should do the trick.

Incompatible format

If the problem persists, try copy the song via USB cable connected to a Windows 8.1 and above PC. Any song that’s recognized as audio file by Windows and is incompatible to Windows Phone OS will be reformatted upon copying via USB connection. A dialog box will appear with this option.

Duplication conflict

The third and fourth causes are also quite simple to test. Simply rename the file and (possibly) the track title using a tag editor software such as Mp3tag. If the song works again, track down those duplicates and delete them. Then, check all playlists for any references to the song and delete them too.

Path length / Scan depth

Finally, the last addressable cause is path length. I have a fair bit of experiences working with Nodejs on Windows and I’m well aware of the path length limit of the OS. It is safe to assume that as Windows Phone is the younger sibling of Windows, it should possess the same limitation (and possibly worse).

Given how Groove Music, the default Microsoft’s music player, works on Windows, the “shortcut” reference of the song its scan function created in an app storage as lengthy as “C:\Users\<username>\AppData\Local\Packages\Microsoft.ZuneMusic_<random hash>\LocalState\Database” can potentially hit Windows Phone’s limit with just a little nudge.

In any cases, this is my problem and shortening the path length by moving all files up one level in the hierarchy did it for me. So, instead of SD/Music/Album/song.mp3, it’s SD/Album/song.mp3 after the move. I suspect it has more to do with arbitrary depth scan limit in the programming code and not the path length limit but meh, who knows what the interns at Microsoft did to produce such a broken piece of software.

At least it’s free and not full of fitness ads.

Memo: One-shot timer and op-amp filters

Integrators and Differentiators are basic building blocks of analog computers. They enable summation and subtraction operations (hence, the core component of them is called “operational” amplifier). For multiplication, multiple integrators are used in parallel, along with exponential and logarithmic elements (non-linear op-amp circuits), to achieve the effect via the following transformation:

ln(ab) = ln(a) + ln(b) = c

e^(c) = ab 

This is why analog multiplicators are expensive, costing up to $20 a pop.

All the circuits below require very specific values for their components. Changing the value of the components will do more than changing the properties of the output, it can cause instability and disrupt the circuit’s operation. As an oscilloscope is required to diagnose these circuits, some preset values that have been tested in the lab are also included in this memo for DIY projects at home.

Monostable multivibrator (one-shot timer)

Monostable multivibrator has one stable state and it will change to the unstable state for a period of time when a trigger pulse (negative edge) is introduced as input.

The circuit can be derived from astable multivibrator circuit; the only new addition is the grounded diode in parallel to the output capacitor. If all values are appropriate, connecting the diode will dampen all output and (negative) feedback generated by the powered astable multivibrator without any input. After this dampening characteristic has been achieved, negative edge trigger input can be introduced to complete the circuit.

The basic circuit is as seen below:

basic op amp monostable
Basic monostable multivibrator: R1 = 10K, R2 = 2.2K, R = 1K, C = 1uF
op amp monostable waveforms
Measuring the voltage behavior across the capacitor C yields a shark-fin waveform

The timing period T is the amount of time it takes for the circuit to return switch from unstable back to stable state. The timing period is given by

T = RC ln[1 / (1-B)]

where B is the regenerative feedback as described in Memo: Schmitt trigger. The units of the remaining variables are as follow:

T: seconds (s)

R: ohms (Ω)

C: farad (F).

Cheat sheet: when R1 = R2, the timing period T = 0.693 RC

Similarly, the charging period is the amount of time the circuit must wait before it can be triggered again. This is given by

T(charging) = RC ln[(1+B) / B]

In some circuits, an additional RC differentiator circuit can be connected to the input (sometimes, only a single 0.01uF capacitator is sufficient). The purpose of this extra circuit is to transform rectangular signal into trigger pulse signal as seen below

rc differentiator circuit
RC differentiator

The complete monostable circuit is as follow:

op amp monostable circuit
Final monostable multivibrator with RC differentiator

Integrator functions like an average filter, it’s often used as a low-pass filter.

Inverting integrator: C = 0.01uF, R = 1K

The output of the integrator is given by

V_{{{\text{out}}}}(t_{1})=V_{{{\text{out}}}}(t_{0})-{\frac  {1}{RC}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t

or in Laplace domain, it is

Vout = -Vin/(sRC)

If the integrator starts from zero (no charge in the capacitor), the output is simply given by

-{\frac  {1}{RC}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t

where Vout(t0) represents the output voltage of the circuit at time t = t0.

Op-amp integrator suffers from the same frequency response limitation as other closed-loop op-amp circuits. It has a cut-off frequency at -3 dB and a decreased output at high frequencies. In addition to this, the integrator also has run-away output issue where it can drift to either power rail due to constant noises and it must be reset periodically to prevent this problem.

The drift is caused by any of the three conditions:

The input Vin has a non-zero DC component,

Input bias current is non-zero,

Input offset voltage is non-zero.

A more complex, grounded integrator circuit prevents this drift

Grounded integrator circuit

A simple switch in parallel to the negative feedback capacitor allows resetting the integrator to zero.

For the grounded integrator circuit, the output is given by

V_{{{\text{out}}}}(t_{1})=V_{{{\text{out}}}}(t_{0})-{\frac  {1}{R_{{i}}C_{{f}}}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t


Differentiator, in contrast, is a high-pass filter. It has poor high frequency response and any sudden disturbance at the input will cause it to ring at natural frequency

Op-Amp Differentiating Amplifier.svg
Inverting differentiator: C = 1F, R = 1K

The transfer function of the above circuit is as follow:

V_{{{\text{out}}}}=-RC\,{\frac  {\operatorname {d}V_{{{\text{in}}}}}{\operatorname {d}t}}\,\qquad {\text{where }}V_{{{\text{in}}}}{\text{ and }}V_{{{\text{out}}}}{\text{ are functions of time.}}

or in Laplace domain:

Vout = -sVinRC

Bonus: Non-inverting integrator

Like closed-loop amplifiers, non-inverting integrators and differentiators circuits are easily achievable by switching GND and Vin. A possible circuit for non-inverting integrator is as shown below and it makes use of an RC passive low pass filter circuit at the non-inverting input.

Non-inverting integrator: one extra passive low pass filter at the non-inverting input
Read more