# THE LACK THEREOF

Cool things I saw on the internet at some point:

# 2020.01.19 Mobile WebAudio Synth

I got a Pocket Operator PO-33 a while back, and find it super fun -- it is minimalist and usable. It inspires me to play around with beats and tunes ... and it also inspires me to work on my own samplers, sequencers, and synths.

Let's see what we can do with Web Audio these days! Starting with a basic VueJS app, I googled lots of stuff. Somewhat randomly, I wanted a Wicki-Hayden hexagon style keyboard, so had to find some CSS that makes hex-buttons. I'll probably switch to this Hexi-Flexi-Grid at some point, to make dynamically sized hexagons easier, but these work.

Combine that with a simple synth, and now we have a playable thing. I had to make some tweaks to get it to work tolerably on my phone -- fix the layout size, use touch events. Unfortunately it isn't very usable at this point due to a sizeable delay between pushing a button and the sound. I'm going to write a pure-JS snippet to eliminate any overhead from VueJS, and if that is also slow then I'm not sure what I'll do. It's kinda cool that I can use Web Audio ... and I'd sure like to keep using it. We'll see!

Other ideas ... so many. I want to give it access to your microphone so you can record a live sample. The PO-33 then lets you pitch the sample (by speeding it up and slowing it down) and maps it to the keys. I'd like to do that, as well as try a pitch change while keeping the duration. Probably after that is doing some sequencing and/or looping. The PO-33 also has one-shot mode for drums, so might do that. So many things!

Check out the Demo Build and the Github Repo.

# 2019.03.03 Learning Machine Learning

I'm working on making the jump from READING about recent machine learning techniques to APPLYING recent machine learning techniques. I have some nice datasets at work, so I am doing a bit of double-dipping by playing with those.

I previously struggled with getting started, getting bogged down in picking technologies and such. I'm specifically going after some Neural Network models, so also get overwhelmed with the Python ecosystem of tools and libraries. The best way to get started is to get started .. so I turned the corner with a little help.

Fluent Python (book)
Great advanced-introduction to Python, letting me better understand/recognize meta-programming and DSLs. Things like the array-slice syntax turning into an object which can be passed to any class that implements the right methods.
Keras
I think this is the second-most popular python NN library, after Tensorflow itself, and it has Tensorflow as a backend. Seems nice and usable. Then I pull in whatever numpy stuff as needed.
Convolutional Neural Networks
I knew about image and audio convolution filters, so had to spend some effort in transferring that knowledge into how convolutional layers work in a CNN. I read a bunch of articles like Visualize CNN With Keras to get my mind around this.
Dog vs Cat with Augmentation
I had been through random tutorials before, but this time I went through Building Powerful Image Classification Models Using Very Little Data in detail, step by step, and made sure that I roughly understood each step. To help, I switched from Dog and Cat images into my own dataset -- so I had to go through the usual data cleaning process in addition to the learning.
Living Code
Meanwhile I've also been sharing my excitement with friends and coworkers, and started a new Machine Learning club at work. We're taking even the simple examples and building them into services that our live systems can use - code that isn't running is dead code, and dead code is soon abandoned code. A big part of this learning is getting LIVING examples, and the double-dipping of making something useful for work is a great way to get that.

# 2018.12.08 Transition

let gray = amt => color(amt, amt, amt);

function setup() {
randomSeed(7);
createCanvas(600, 600);

for (let i = 0; i < 200; i++) {
x1 = randomGaussian(300, 120);
y1 = randomGaussian(300, 50);
y2 = randomGaussian(300, 50);
fill(gray(x1 / 600 * 255));
line(x1, y1, x1, y2);
ellipse(x1, y1, 20, 20);
ellipse(x1, y2, 20, 20);
}
}


(View full source at https://repl.it/@BrockWilcox/Transition)

# 2018.11.12 Destroy Things

I think it's important to learn through destruction. I like to proble the edges of things, and one of the best ways of knowing where IS the edge is to go over it. So ... let's go over the edge.

First we need a nice fresh ubuntu:

awwaiid@zokei:~$docker run -it ubuntu bash root@1cf14a7465fd:/#  Now, this isn't a completely isolated machine or anything, but it'll do. Keep in mind that this is running as root on your machine (if you're running a Linux host at least, this is probably safer on osx), so you should be a little afraid. Fear will keep you on your toes! Let's cause a little destruction! Make sure you are INSIDE of this new ubuntu container, and then: root@1cf14a7465fd:/# rm -rf /  They always joke that you shouldn't do that. Turns out our lovely ubuntu is trying to help us not hurt ourselves, so we have to pass a special flag: root@1cf14a7465fd:/# rm -rf --no-preserve-root /  WHOA! Whole lot of errors. Many of them are very good things about how you can't remove stuff in sysdevices because of it being a read-only filesystem (remember that running as root bit?). And now the fun begins. root@1cf14a7465fd:/# ls bash: ls: command not found  Oh right. "ls" is a command that is an executable program that lives at binls. Correction: LIVED. But no longer. That's ok ... tab completion still works! root@1cf14a7465fd:/# cd <tab><tab> dev/ etc/ proc/ sys/ root@1cf14a7465fd:/# cd etc root@1cf14a7465fd:/etc#  Great! So we can git directory lists. Let's look at some files root@1cf14a7465fd:/# cat <tab><tab> hostname hosts resolv.conf root@1cf14a7465fd:/# cat resolv.conf bash: cat: command not found  Oh right. No "cat" command either. What commands DO we have? Well, we have any bash built-in. And we have bash as a programming language with loops and all that. Now we start to get fancy. root@1cf14a7465fd:/# while read p; do echo$p; done < /etc/hostname
1cf14a7465fd


Nice. We can now look at the contents of files. But if we are ever going to rebuild our system we'll also need to write files. Easy!

root@1cf14a7465fd:/etc# echo 'echo "hello!"' > hello.sh
root@1cf14a7465fd:/etc# . /etc/hello.sh
hello!


We cheated a bit with that "." to "source" the file. I'm not sure how to make it executable, since we no longer have chmod. Maybe we'll try that next time.

More...

META INFORMATION: This is the technical blog and wiki of Brock Wilcox (awwaiid). Entries focus on my current projects, interests, and sometimes life events. If you'd like you can check out the list of All Entries or the RSS Feed. I also have a LiveJournal syndication feed for LJ friends.

2020-02-18

2020-02-14

2020-02-03

2020-01-20

2020-01-01

2018-07-02

2018-06-30

2020-02-10

2020-02-09

2020-02-16

... more changes