All that remains here are practice pieces for vibe coding.
This time, I tried creating a VST3 plugin for use with a DAW (Digital Audio Workstation, Ableton Live).
The plugin picks up the sound of me tapping on my desk using a microphone (an old iPhone earphone with a built-in mic) and uses that as a trigger to play a hi-hat sound. Depending on how wide I open my mouth in the video, the plugin determines whether to play an open hi-hat or a closed hi-hat.
The plugin does not generate the hi-hat sound itself but outputs it as a MIDI note.
However, there’s a significant delay between the actual movement of my mouth and the change in hi-hat sounds, making it difficult to play smoothly.
While face recognition using the MediaPipe library is quite fast, it seems the main issue is that the camera’s frame rate is only 30 fps.
A small achievement from this challenge was learning that it’s possible to display camera footage within a VST3 plugin and that facial recognition using an AI model is also feasible.
音楽ソフトのプラグインを作って、その中で表情認識をさせてみた。
机を叩いてその音をトリガーにしてハイハットの音を鳴らすのだけれど、そのときに口が開いていればオープンハイハット、閉じていればクローズハイハットの音が鳴るようにした。
でも、口の実際の動きとハイハット音の切り替えまでが結構遅延して演奏が難しい。
カメラがフレームレートが30fpsしかないことが大きな原因っぽい。
くそう……。
今回からOpenCode Goに10ドル課金して、LLMとしてDeepSeek V4.1 Flashを使ってみた。自分の用途くらいなら充分使えそう。
I felt like the version I released a few hours ago was a little lacking.
So, I added a rotation feature as well.
It rotates around the center of both shoulders so that the right arm is horizontal and in a straight line.
さっき公開した動画だと動きが寂しかったので回転機能を追加してみた。
こっちのほうが動きが派手。
This is just a tiny little experiment.
I tried to see what the world around us would look like in a space where a person’s left and right arms always appear horizontal and in a straight line.
Well, that’s really all there is to it.
ひとつ前の動画を作るまでが結構たいへんだったので、今回は30分くらいで作れるものにした。
左右の腕が常に水平に一直線に見える世界はどういう世界なのかを提示してみた。
AIはGemini-CLIがサービス終了したので、Antigravity-CLIをキャンペーン料金で安く使っているのだけれど、そろそろキャンペーン料金期間が終了してしまう。
で、これは試しに無料のBig Pickleというモデルで作ってみた。
This is a slightly improved version of the project I posted yesterday.
To be honest, I thought I’d gotten tired of working on this project yesterday, but when I watched the video again, I realized I just couldn’t accept that reaction speed.
So, I’m re-posting a version that’s been optimized for speed.
I’m pretty satisfied that I was able to achieve this speed for facial recognition using the ESP32-S3.
昨日投稿した動画を見直すと、やはり表情の認識が遅くて許せなくなってしまった。
で、高速化したので、それを改めて公開。
安いマイコンESP32-S3でこのくらいできれば結構いいんじゃないかなー。
I slept in a little too long.
It’s already been four months since I posted my last project.
The “functionality” of this project is the same as my previous one.
As I mentioned in the comments on my previous project, I used a PC or smartphone for facial recognition processing and an ESP32 microcontroller to control the LED matrix. That’s why, when I released my previous project, someone mistakenly said,
"It’s amazing that facial recognition works on an ESP32!" —but the ESP32 was only handling simple processing.
The key difference in this project is that the facial recognition processing is handled entirely by a small, inexpensive microcontroller board called the ESP32-S3.
This was quite a challenge. Until now, I’d been using an existing library called MediaPipe for facial recognition. However, MediaPipe doesn’t work on the ESP32-S3.
So, I had to start from scratch by creating an AI recognition model that would run on the ESP32-S3.
After a lot of trial and error, I finally got it to work to this extent, but it’s slow, and misrecognitions increase when the lighting changes. Plus, since the AI model I created is specific to me, the results turned out to be a bit disappointing.
This project was a bit of a challenge, but from now on, I’d like to go back to making the kind of silly projects I usually do. ;p
前回の作品投稿したのが5月なんだって。
月日は百代の過客だね。
今回は以前の同様に表情認識をしてマトリックスLEDに表示するものなのだけれど、以前と決定的に違うのは認識処理をESP32-S3というマイコンボードだけでやっていること。非力な能力しかないからいつも使っているMediaPipeというライブラリは使えないし、1から学習させた小さなAIモデルを作らないといけなかった。
結構頑張ったものの汎化能力も足りないし、精度も足りず、誤認識も多い。
でも、だいぶ飽きたのでこの程度でやめておく。
While I was talking, I tried out the system I posted about last time. Depending on how wide I open my mouth, a wah effect is applied to my voice.
Maybe I should have adjusted it so the wah effect kicks in a little more easily.
前回投稿した「口の開け方によってワウがかかる」というエフェクトをかけつつ話したらどうなるかを試してみた。
もっとワウがかかりやすくなるようにパラメータを調整すべきだったけれど、まあいいやw
In my previous work, I controlled the overdrive effect based on the width of my mouth, but I received a comment asking how the wah effect would work.
I thought it would be better to control the wah effect based on how far I open my mouth vertically rather than its width, so I made some changes.
It would be great if I could actually play an instrument, but since there isn’t one I can play properly, I’m just playing randomly.
口の開き方でワウ(というエフェクト)をかけるという試み。
基本的には前回のものを少し変えただけ。
いつも以上にバカっぽくてお恥ずかしい。
MIDI制御可能なエフェクターやDTM(DAW)システムがある方はカメラ付きPCを使って試すことができます(下記URLにアクセス!)。使い方は説明しないけど。
I often hear the saying that musicians play with their facial expressions.
In this installment of vibe coding, I actually tried controlling the sound using facial expressions.
This is similar to my previous work, where I used my entire body to control MIDI.
In this piece, I use the width of my mouth (relative to the distance between my ears) to generate a MIDI Control Change value (0-127). I then use the output value of that MIDI Control Change to manipulate effects in Ableton Live.
This allows me to control various audio effects with my facial expressions. In this case, I’m using it to control the distortion of an overdrive effect.
There’s just one problem I forgot to mention. Unfortunately, I can’t play the guitar.
ネタ切れ中というか、アイデアがあっても面白いと思えなくなってきた今日この頃。
そんな今回の動画では口の幅(左右の耳の間隔に対する相対的な長さ)を検出してMIDIコントロールチェンジというパラメータにし、それをDTMソフトのエフェクターに送り込んでギターのエフェクト(歪み)量を変化させるようにしてみた。MIDI制御できるエフェクターなら何でも制御できるはず。
これなら弾きながら自由にエフェクトを変化させられる!と思いきや、表情のコントロールに注意が向くと指が動かないのだった。
まあ、もともとギターは弾けないのでデタラメに鳴らしているだけだけど。
It’s been a while since I’ve done vibe coding, and once again, I ended up working with LEDs.
I’ve displayed a face before, but this time I tried rendering a full body. It was quite a challenge to represent the entire body using an 8x8 LED matrix.
This time, I used the inexpensive MAX7219 as the LED driver chip, and it worked without any issues.
The microcontroller is an ESP32-C3, and I’m sending the LED display data from a Mac that analyzes the video to the ESP32-C3 via Bluetooth.
In the latter half of the video, the joint positions of the head, torso, and limbs—as analyzed—are displayed as an overlay. We used this data to control the LEDs, but it wasn’t as straightforward as we’d hoped, so we went through a process of trial and error.
Incidentally, a famous work that uses an 8×8 LED matrix to depict a human figure is “BITMAN” by Meiwa Denki and Ryota KUWAKUBO. In that work, the Bitman inside the device dances.
https://www.maywadenki.com/products/goods/bitman/
しばらく自分の根気とやる気と技術力とセンスの無さに打ちひしがれつつ、自分はこういったことをアートとは呼ぶつもりはないが、現代のアート界隈について考えていたのだった。
まあ、しかし、それにも飽きてまた以前通りに戻るのだった。
Caution! Inserting electronic devices into the body is dangerous; do not try this at home.
I had another idea for an LED matrix device, so I tried it out.
Daito Manabe and Motoi Ishibashi had already attempted to light up LEDs in the mouth back in 2009.
https://www.youtube.com/watch?v=QsWc58zmBKI
https://www.youtube.com/watch?v=zWxPxzTRNF0
This time, I embedded LED matrix devices on the inside of both cheeks and controlled the display based on the shape of the eyes and hands.
The way they light up differs, perhaps because the thickness of my right and left cheeks is different.
I managed to make it so that a "TT" pose displays "TT," making a fist displays cat whiskers, and winking makes a cross rotate on the open side, but unfortunately, these effects aren't very clear.
左右の明るさが違うのはおそらく頬の厚みが違うからで、左側で噛むことが多いのだろうという発見があった。
最初は白いLEDでやったものの、もっとよくわからない感じで、波長の長い赤いLEDに修正してちょっとよくなった気がする。
でも、手をグーにすると猫のヒゲが表示されるようにしたのはまるでわからないな。TTポーズも微妙。ウインクで開いている側は十字がくるくる回転するようにしたのも全然ダメ。そもそも元からの目の細さによってウインクとして検知されない悲しみ。
口にLEDを入れることは2009年に真鍋さんと石橋さんがとっくにやっていて、それだと光の動きはないもののいろんな色に光ってオシャレな作品だった。