Skip to main content

Posts

Showing posts with the label python

ML / Using Turi Create for Machine Learning Style Transfer

A few days ago, I found out about "Turi Create" , basically a Python module, a tool from Apple that allows non-Apple computer user to generate MLM aka Machine Learning Model that can be integrated inside iOS app on iPhone and iPad. The cool thing about Turi Create is that you can also use it for your own purpose in processing data using Machine Learning. https://developer.apple.com/videos/play/wwdc2018/712/ As an additional note, at WWDC 2018, Apple also presented XCode Playground tool for MacOS that allows user to easily generate this MLM model for all kind of purposes. The process is as simple as drag and drop for Image Classifier. It is quite fascinating and worth watching the video. STYLE TRANSFER From what I gather after a short research, there are a few applications of Machine Learning that we can use in application such as for Image Classification, Graphing, etc but one that interest me in particular is STYLE TRANSFER using Turi Create: https://apple.gith...

SONICPI / Ruby, Python, MIDI and OSC

I have a big curiosity on how we can use OSC or MIDI to send message from one app to another app, potentially to generate (realtime) synth sound, visualization, and animation. This is especially a fun area and environment when we wanted to use CODE for CREATIVITY. Sonic Pi (by Sam Aaron) is one app I really love to use when dealing with Synth and Sonic generator. I remember using ChucK in the past by Ge Wang, ChucK is also cool, but Sonic Pi is a lot more friendly. http://sonic-pi.net Sonic Pi multi-threaded ness and LIVE LOOP is really something new for me. But Sam made it easy enough so that we could generate "listener" very easily. MAKING SOUND WITH CODE There are plenty of ways we can "trigger" Sonic Pi to generate sound. Obviously we can just use the built in RUBY language inside Sonic Pi app. Fairly simple and fun language to use and you can generate some noise in no time! Sonic Pi RUBY language documentation is really in depth and a full on progr...

PYTHON PROCESSING / Working with Image

IMAGE being drawn on top of each other on every loop. Each image is drawn on the position of mouse X and Y. Can you guess what image is this? Continuing with my Python Processing study. I wanted to touch on IMAGE object real soon because it is one of the most fun topic we can do pretty quickly and easily. While doing this, I am also looking at the provided example on IMAGE topic and also this YouTube video tutorial by John Park on Processing 3 (Java):  https://youtu.be/ddtdPO3m1hw What I am showing here is pretty basic however important for beginners and I am familiarizing myself with Python language for Processing. Instead of Java. The whole code looks like below, with some parts commented for you to try yourself: //Your code here //Be sure you escape your tags with < and > when displaying things like HTML. Few important notes: With Python, we do not seem have to explicitly specify the TYPE of object instance we are creating...

PYTHON PROCESSING / It only really begins ...

Back into Processing again, with Python! While Daniel Shiffman is continuously inspiring us with his CODING TRAIN series on YouTube, using Processing with Java and Javascript language, I decided to free my mind and trying to really do something using Processing and Python language. Installing Python language version on Processing 3 is easy enough, just first download the latest Processing and install the Python language mode via Add Mode button. Other link that might help: https://github.com/jdf/processing.py http://py.processing.org/tutorials/ BLANK MODE As soon as Processing Python Mode, opens up and running I am presented with a  blank environment. Suddenly I recalled my journey in learning programming from zero until now... With Python, outside Processing, commonly people will be introduced to Python IDE or IDLE environment. Something that looks like Console Window or Command Prompt, where we type single liners command. Python Command Line and IDE normally ha...

music21 / MIDI and Python

If you like to generate music with Python, the last time I checked, we have module for ChucK and also for Pi Sonic. They both require server to talk to Python, there might be slight latency and delay, but they are quite fun and easy to setup. And... there is also this fully Python module that deals with music: (a bit hard to use I found) http://ajaxsoundstudio.com/software/pyo/ I like the idea of being able to generate music on the fly via Python. Would be nice if realtime, and if I could connect it to ... Blender 3D for example. Anyhow, I remember apart from SYNTH there is also MIDI, and maybe Music Generation does not have to be realtime, if we can code certain BEAT and TRIGGER to match the animation or sampling of other stuff that we can visualize. PYTHON AND MIDI By some kind of magic I actually stumbled into this 'music21' module for Python. http://web.mit.edu/music21/doc/about/what.html I look through this 'music21' quickly and found lots of interesti...

PYTHON PROCESSING / Better late than never!

Only the other day, I started to look at Processing again. And I just realized it has Python mode! MOMENT OF REALIZATION I really SHOULD have taken Processing thing more seriously years ago. I practice and study Processing ON and OFF, depending on interest. Processing was particularly very popular around 2010. Still not dying today, not sure whether people are still using it or not. Lots of good books were written back then. As Visual Artist, my attempt to start getting serious with programming started when I was looking at works from John Maeda. I have one of his digital art book, still inspiring and brilliant. I think his book and tool titled Design By Number (DBN) is one of books that encourage myself to try on programming. DBN is simple and interesting and the book is worth looking before one jumps into Processing. There is also another book about "Basics Programming" with lots of cartoon drawing of dragons, etc. It helps me to say to myself: "Ok, I should learn...

WOLFRAM vs PYTHON / For the Love of Animated GIF

Not sure where to start writing this topic, but it has been in my head for a while. I will jump around, but all will be related to animated GIF. But basically when it comes to dealing with GIF (animated) using code or programmably, there seems to be no easy way. For example, there is no Python module that deals with Animated GIF elegantly.  I found it really strange. In my previous experience as graphic designer, I have used Photoshop to edit and create animated GIF. Editing GIF is simple enough in Photoshop via the interface and menu. As many years pass by, I tried to challenge myself to try not to rely too much on Photoshop. The truth is I want to be very flexible with my computing habits these days (it needs to be portable) and also I am becoming a little bit more comfortable in programming. So, with open source languages like Python, Processing, or Wolfram Cloud, I supposed I should be able to produce animated GIF quite easily right? Well, not that simple apparent...

JUPYTER / More Interesting Modules

Turtle slowly walks in spiral in search for Zen of programming. Over the weekend, I am again searching and exploring Jupyter Notebook in a heuristic fashion. I indeed found some interesting modules along the way that worth nothing, and as well discovering a few more *hickups*. Basically, I have a need to find enough "visual" modules, probably under 10 modules, that give me starting tools so that I could create some interesting Image Output, in the way that Wolfram Language can. Wolfram Lab Cloud indeed is powerful visually. I don't know how to explain, but being able to query Planets images (or all kind of stuff), and then seeing the list as image picture of some sort, then filtering the list or further scrambling the images... are brilliant. So, I do have come to some realization that a lot of codes are to be required and studied in order to be able to make some of the "cool stuffs" that Wolfram can do much easier. Yet, still, there is a good feel...

IPYTHON / Jupyter Notebook Begins

For the last few days, I have been dwelling myself into Wolfram Language inside Wolfram Cloud Lab , which is really quite a brilliant and I got a taste of a BIG KNOWLEDGE and ALGORITHMS. I grow to like Wolfram Language really quickly. It sure has lots of potential. I have few issues with Wolfram Language, knowing these 3 things: I cannot work offline with Wolfram Lab free basic (need the cloud access and Internet for non Desktop version). I wish that FREE mode gives me the Desktop version. With FREE Wolfram, I am pretty much limited. I am willing to pay when I got serious with my research, but that is for later. Wolfram Knowledge Base, aka Wolfram brain is very big, with all the objects and symbols, however, it does not mean it knows everything or have the data that I wanted to work on (obviously!). I do not want to be limited by Wolfram cloud data allowance or memory limit. I guess the path of self-taught artist wanting to learn bigger idea of programming can be a bit bumpy :...