Skip to main content

Posts

SWIFT PLAYGROUND / QR Code Generator

This is a quick test to make QR Code Generator that will run on Swift Playground app on iPad. I sourced some of the code online from few forums. The resulting QR Image on "Playground Preview" is stretched, however it seems to still work when I am using iPhone camera to scan it. Ideally the Playground Preview should not be stretched like this and keeping the QR image square. Saving the QR Code itself is another mystery. The whole code is actually very simple, taking advantage of Core Image CIFilter "CIQRCodeGenerator" as below: import Foundation import UIKit import PlaygroundSupport let data = "https://youtube.com/c/jimmygunawan".data(using: .utf8) let filter = CIFilter(name: "CIQRCodeGenerator", withInputParameters: ["inputMessage" : data, "inputCorrectionLevel":"L"]) let ciimage = filter!.outputImage! let transform = CGAffineTransform(scaleX: 20.0, y: 20.0) let image = ciimage.transformed(by: tran...

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...

LIVENODING 797 SV Texture Displacement for Compositor

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...

SWIFT / Swift Playground on iPad Test

Using Apple  Swift Playground  for the first time is actually quite an interesting experience. There are so many different paths to get HERE, especially when nobody actually guides you. You might be on your own, but you can always try Google Search and look for example and video tutorials on YouTube. Over the past few years, Apple has introduced all these cool tools that probably confuse people at first, but actually make sense today in 2017. I really have to dig into older WWDC as far as 2013 and see what Apple is trying to do. As a total beginner to App Development environment and all kind of actual coding and building interface, control, logics, there are A LOT to make sense. SWIFT PLAYGROUND AS JUMPING STONES I think, THE MOST IDEAL path of actually getting into Apple XCode app development via SWIFT PLAYGROUND is like this: 1) Start with Swift Playground on iPad, not XCode! For beginner coders, whatever your age, maybe even for those who never code b...

IOS / ARKit and SceneKit Introduction

I am thinking to write a series of article blog on developing iOS app, but in term of experimental and educational level. No aim in particular, but I think documenting my baby steps with iOS app development might actually help others. MORE FUN THAN I THOUGHT Being exposed to Apple XCode for the first time (version 9 beta I am using) and Swift 4, and also iPhone capability to do Augmented Reality , really bring a whole lot of fun area I can explore. Even as 3D artist with little programming knowledge like me, I can say that it just takes a bit of effort and motivation to brave yourself and try the app creation. Even if you are not going to make paid app, the act to actually make your iOS device to work for you using your own custom app is amazing. Making program for desktop computer VS making apps for mobile device is a totally different set of skill, in a sense that for mobile device (comes with powerful camera, wifi, bluetooth, AR capable, GPS capable and a lot more) you hav...

IOS / File Sharing via iTunes and Files app (iOS 11)

Saving FILE / DOCUMENT that you generate using your iOS app is an interesting task when developing iOS App. Eventually you also want to know this ability. You can apparently very quickly save out text files, or output all kind of processed files, etc. into Document sandbox of your app, for later to be accessible via iTunes or NEW Files app (iOS 11)! WRITE https://www.hackingwithswift.com/example-code/strings/how-to-save-a-string-to-a-file-on-disk-with-writeto CUSTOM URL You need to prepare your URL Scheme for your app first. This will be handy at later stage. http://jayeshkawli.ghost.io/ios-custom-url-schemes/ PLIST Then we got to deal with PLIST attributions. This is pretty easy once understood. http://pinkstone.co.uk/how-to-enable-itunes-file-sharing-in-your-ios-app/ https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW20 https://developer.apple.com/librar...