Debt-free feeling

There’s no greater feeling  knowing that tomorrow I don’t have to go to soulless-ville Corporate America, that you want to be early to work because you want to and not because you have to impress somebody for that 3% raise. Even tho a startup is still a job, having that flexibility makes me happy and motivated for the future. Each day is a new challenge and a new thing to learn that can help you gain your freedom in the future. I’m coming to a point where I’m willing to give all short-term material things to pursue the dream and be a winner to myself. Maybe I’m changing where I don’t care that much what people thing of me and I care more what my little voice inside me is yelling.

In late 2018 I definitely will go all-in for my dream and I will work 24/7 for those dreams and I know I got what it takes, because I showed myself that I can work for long periods of time and still have the energy to hit the gym, work on my side projects and wake up early. I know I can outwork people and be smarter. This is the year because I will have savings and a laser focus mentality to do only one thing which is work for my autonomy. My savings should last me one year to fill my biggest potential and if I fail I will definitely be another person more smarter and more brave, I think its worth it!

I bet there’s more people that feel the same way, but they’re trapped with things like a debt, etc… I remember when I had student/car loan and I was a different person, I was more afraid, more compliant, more ‘nice’, so yeah being debt free changes you in a good way I think. A lot had to do in a period of my life where my parents had a mortgage(worst debt) and they always struggled to keep the American facade . It was and still is a tough life for them, but it taught me the value of being debt-free. Sure sometimes you see your friends in a new shiny luxurious car and it makes you want to go to the dealership and buy a newer one for 36 easy payments of $700. After being influenced in some way I pause, remember the feeling of being in debt and the feeling of keeping up with the joneses goes away.

Going to the unknown its scary, but it excites me and makes me feel some kind of way amazing when I know that’s where you meet new people, new experiences, new emotions, new sweet memories and more importantly you evolve.




Startup life

Oh… hi! its been 2 months with no update and thats because I been busting my ass at the startup I was hired. I’m learning tons and my mobile programming skills are going to the next level on a fast track. I wish I got hired there after college instead of going to the soul less that is corporate america. I’m learning more about android, ios, source control, provisioning, certificates, product development, management, tools like jira, trello, work under stress and soon continuous integration.

I moved to downtown Dallas and I never been happier in my life, I’m able to walk everywhere since I hate driving and my job is crossing the street. This is the life I’m going to fight for forever and I hope to never go back to a gray cubicle for a big company. Currently my goals are to save the most amount money I can to invest in the near future, I want to have a 1 year Fuck you fund and the most amount of knowledge.

My audio podcast app is almost finished, at least the logic behind it and next is to beautify and add settings to the app. I’m not going to lie, but sometimes I’m tired from programming all day at the startup. But I know that’s just a limiting belief and that gets fixed with a 20 min nap. Another goal is I have to eat out less and learn how to cook fast but delicious meals, because everything in downtown is way more expensive. Another thing to improve is to focus more on the weekends and go out less.

I really want to have a better life and be able to take care of my parents in the future. I know I will do my best in which ever path I choose and I promise to myself to NEVER be a cubicle slave again. I will work double! to never go back to that sad uninspired gray life. For now I will focus on saving money and learning lots! I will never give up…. You only fail when you quit.

Something amazing: Recruiters are asking me for interviews for ios development every day i get new interview offers and the weird thing when I was an engineer, NO ONE WANTED ME or was looking at my profile.


I got hired as an iOS developer for a startup!

I haven’t been updating my blog because I got hooked developing a podcast player (which Im still developing). When I started learning iOS it was never my intention to become a developer for a startup, but I started getting more boring responsibilities at my current engineering job and I needed to focus more of my attention on growing/taking risks on myself instead of checking spreadsheets. So I saw this position for a Jr. mobile developer on and I got an interview the next day and hired on the spot. I saw great potential to grow with the startup, more potential to impact people’s lives and learn more about iOS. 

I took a pay cut because I believe on what they do and the team looks happy to be there. I know whatever I learn and apply myself it will help me for the challenging future. I know I will have to work way more than my current RF position, but I know it will be worth it. I don’t know if in the future I want to have a startup, a small business, or be a freelancer, but I do know I want to be somebody and I’m willing to take the risk.

Now I do think what helped me to get the job was my soft skills and to be likable i.e.: Smiling, be excited, asking questions, looking sharp, be in shape, current projects and have an app in the App Store to show(source code included). As well they saw that I was single with no responsibilities and they needed someone hungry willing to grind/learn. So I’m moving to downtown and my job will be within walking distance. I really HATE commuting, is the most soul crushing thing and not to mention you share the road with neurotic/crazy human beings.

So sometimes you have to take the opportunities that are in front in you and give your best. I learned to stop thinking about how the future should look like, because it will never be like you imagined and enjoy the moment.  

Last minute Post

It’s almost June and I almost forgot to write a post this month, times goes by so fast. Anyway I been having a great time here in Addison making some coins and paying debts which next month I will be debt free forever, debt kills dreams…sigh. Also I look more muscular since I have more opportunity to lift and sleep a bit more by only going to the gym 3x a week for 1hr.

I love having flexibility on my job, but I really want to work from home everyday. I don’t mind working all day as long i don’t have to commute to an office full of bright incandescent lights. Currently I work from home 2 days and its a blast to waking up to not having to rush and fight traffic half asleep. Waking up to the smell of coffee and the sound of birds or minimal music in my quiet studio apartment.The dream….  Maybe it will get old? I don’t know but I love it and I will fight for this kind of lifestyle.

On programming I been trying different ideas. One is to make a podcast app with a new feature and another is to make apps for radio stations. I wrote a sales letter to a radio station for a great looking app and see if they respond. I read books like No B.S. by Dan Kennedy and I really like its No B.S. teaching style about copywriting. Another book is Unscripted by MJ Demarco and its about how society condition us to be consumers. Also I tried to validate my idea of the podcast app by using google Adwords, Facebook ads and I can see that there’s “so so” demand, maybe my copywriting was not strong enough. I will build it and see what happens. I want to be great!

I been thinking that I want to focus more and learn how to actually learn how to spot needs/problems and then build the app for it. I don’t want to build for nobody, I don’t care what other programmers say like “build stuff you love”, see I love that people find useful what I have to offer and be able to eat well everyday. So I will need to learn more about marketing and try more “salesy” stuff.

WWDC is next week! Ready to break everything out there with Swift 4, but I’m excited to see what’s new.

Time to work!

New location

Finally, I moved to Addison, TX and so far everything is going great with my job. The food in the cafeteria is delicious and cheap, I don’t have to pay $125 for parking, the gym is not a franchise(crowded) and traffic is not bad at all! My work seems to have a lot of flexibility, so that will give me a great opportunity to get in great shape and save a lot of money. I feel more happy and energetic, I felt I was dying inside at my job in Fort Worth. I feel I can learn more rewarding things at this new job which is RF stuff, I always wanted to learn all these antennas stuff.

At the same time, I almost lost my momentum programming audio, since I didn’t program in 4 days while I was moving to Addison. It’ amazing how quick can you lose something that it took you a lot of time to build such as good habits, but it feels good to be back on the grind. Currently I’m trying to build an audio editor app and I learned that simple things take so much time to build or maybe I’m a slow programmer.

I shouldn’t be so hard on myself because I still need to get used to this new environment, but at the same time I can’t rest on my laurels. What matters is always to strive for a better life and say no to a lot distractions. The only thing I really struggle to stop doing is going out with friends and socialize on Saturday night since it gets very lonely at programming, just you and your computer painting pixels on the screen. It can feel that everything you’re doing is a waste of time and some dude in China who has no life already did it better and for free, but I have to trust the process.

Things…. take time! MASSIVE Action and MASSIVE Patience.

On another note, something that I’m trying to improve consistently is my people skills. Sometimes I can be very introverted person, but when I’m happy I’m very extroverted. It’s a weird dynamic that I must become an expert in, people skills are everything. Specially that English is my second language, I want to be able to articulate better sentences, to say things quickly and to kill my inner shyness.

How to create a volume meter in Swift 3

We’re going to create this easy volume meter with AVFoundation and a progress view

You can also add this to incoming audio(microphone), add audio effects, etc… but for now a player will do the job.

-First we start by adding a Progress view to the storyboard

Screen Shot 2017-03-18 at 3.05.36 PM.png


-Create an outlet in the Viewcontroller of the progress view and name it volumeMeter.

-Import AVFoundation

import AVFoundation


-include an audio File to your project navigator, you can use mine if you want

Click save link as…

-add these properties on the class  ViewController

    var engine: AVAudioEngine!      //The Audio Engine
    var player: AVAudioPlayerNode!  //The Player of the audiofile
    var file = AVAudioFile()        //Where we're going to store the audio file
    var timer: Timer?               //Timer to update the meter every 0.1 ms
    var volumeFloat:Float = 0.0     //Where We're going to store the volume float


-On the ViewDidLoad() add this code that will Initialize the engine and load the .m4a audio into an audiofile.

Note: replace the parameter strings for your audio file name “forResource” and “ofTYpe”.

        //init engine and player
        engine = AVAudioEngine()
        player = AVAudioPlayerNode()

        //Look for the audiofile on the project
        let path = Bundle.main.path(forResource: "Electronic", ofType: "m4a")!
        let url = NSURL.fileURL(withPath: path)

        //create the AVAudioFile
        let file = try? AVAudioFile(forReading: url)
        let buffer = AVAudioPCMBuffer(pcmFormat: file!.processingFormat, frameCapacity: AVAudioFrameCount(file!.length))
        do {
            //Do it
            try file!.read(into: buffer)
        } catch _ {


-Next we’re going to connect the player and the engine together

        engine.connect(player, to: engine.mainMixerNode, format: buffer.format)


-We’re going to installTap on the mainMixerNode to extract that juicy float

        //installTap with a bufferSize of 1024 with the processingFormat of the current audioFile on bus 0
        engine.mainMixerNode.installTap(onBus:0, bufferSize: 1024, format: file?.processingFormat) {
            (buffer : AVAudioPCMBuffer!, time : AVAudioTime!) in

            let dataptrptr = buffer.floatChannelData!           //Get buffer of floats
            let dataptr = dataptrptr.pointee
            let datum = dataptr[Int(buffer.frameLength) - 1]    //Get a single float to read

            //store the float on the variable
            self.volumeFloat = fabs((datum))



-Next we’re going to start the engine and play file.

        //Loop the audio file for demo purposes
        player.scheduleBuffer(buffer, at: nil, options: AVAudioPlayerNodeBufferOptions.loops, completionHandler: nil)

        do {
            try engine.start()
        } catch _ {


-Create a timer to update the volumeMeter every 0.1 miliseconds

        //start timer to update the meter
        timer = Timer.scheduledTimer(timeInterval: 0.1 , target: self, selector: #selector(updateMeter), userInfo: nil, repeats: true)


-Finally we’re going to create a new function named updateMeter() that’s going to be called by the timer every 0.1 ms to update the progressView with the new float value.

     func updateMeter() {
        self.volumeMeter.setProgress(volumeFloat, animated: false)

        if volumeMeter.progress > 0.8{//turn red if the volume is LOUD
            volumeMeter.tintColor =

        }else{//else green
            volumeMeter.tintColor =



This is not a perfect volume meter, but it’s a start for more advanced meters.

Github or die

volume meter 2

How to create a SoundCloud like waveform in Swift 3


The first thing you need to get is the array of floats from the audio file and we’re going to use AVFoundation for that.

import AVFoundation

create a struct outside the class to store the audio information.

struct ReadFile {
    static var arrayFloatValues:[Float] = []
    static var points:[CGFloat] = []


-Add the audio file you want to analyze to the project navigator
-Add this code in ViewDidLoad()
Note: Make sure to change the forResource and withExtension parameters.

override func viewDidLoad() {

        //Look for sample2.m4a audio file
        let url = Bundle.main.url(forResource: "sample2", withExtension: "m4a")
        let file = try! AVAudioFile(forReading: url!)//Read File into AVAudioFile
        let format = AVAudioFormat(commonFormat: .pcmFormatFloat32, sampleRate: file.fileFormat.sampleRate, channels: file.fileFormat.channelCount, interleaved: false)//Format of the file

        let buf = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: UInt32(file.length))//Buffer
        try! buf)//Read Floats
        //Store the array of floats in the struct
         readFile.arrayFloatValues = Array(UnsafeBufferPointer(start: buf.floatChannelData?[0], count:Int(buf.frameLength)))


-Create new swift file and name it DrawWaveform
-subclass UIView and import UIKit and Accelerate frameworks

import UIKit
import Accelerate

class DrawWaveform: UIView {

    //This is where we're going to draw the waveform
    override func draw(_ rect: CGRect) {



But before drawing we need to downsample the array of floats, because we don’t need to draw ALL of the floats.
To do this we’re going to use Accelerate framework

-create a new function in the new swift file ‘convertToPoints()’

-Copy this code inside the function convertToPoints(). I will explain this code in detail in another post, but it just reduces the size of the array and converts it to CGFloat.

func convertToPoints() {
        var processingBuffer = [Float](repeating: 0.0,
                                       count: Int(readFile.arrayFloatValues.count))
        let sampleCount = vDSP_Length(readFile.arrayFloatValues.count)
        vDSP_vabs(readFile.arrayFloatValues, 1, &processingBuffer, 1, sampleCount);
        // print(processingBuffer)

        // convert do dB
        //    var zero:Float = 1;
        //    vDSP_vdbcon(floatArrPtr, 1, &zero, floatArrPtr, 1, sampleCount, 1);
        //    //print(floatArr)
        //    // clip to [noiseFloor, 0]
        //    var noiseFloor:Float = -50.0
        //    var ceil:Float = 0.0
        //    vDSP_vclip(floatArrPtr, 1, &noiseFloor, &ceil,
        //                   floatArrPtr, 1, sampleCount);

        var multiplier = 1.0
        if multiplier < 1{
            multiplier = 1.0


        let samplesPerPixel = Int(150 * multiplier)
        let filter = [Float](repeating: 1.0 / Float(samplesPerPixel),
                             count: Int(samplesPerPixel))
        let downSampledLength = Int(readFile.arrayFloatValues.count / samplesPerPixel)
        var downSampledData = [Float](repeating:0.0,
                    filter, &downSampledData,

        // print(" DOWNSAMPLEDDATA: \(downSampledData.count)")

        //convert [Float] to [CGFloat] array
        readFile.points ={CGFloat($0)}



Now we’re going to draw the waveform with the downsampled array.
copy this code inside the draw function in the subview.

This uses UIBezierPath and loops thru the array of floats to draw and at the apply stroke to fill it with color!

Where x is the distance between squares and y is the amplitude of the square.

    override func draw(_ rect: CGRect) {

 //downsample and convert to [CGFloat]

        var f = 0
        //the waveform on top
        let aPath = UIBezierPath()
        //the waveform on the bottom
        let aPath2 = UIBezierPath()

        aPath.lineWidth = 2.0
        aPath2.lineWidth = 2.0

        //start drawing at:
        aPath.move(to: CGPoint(x:0.0 , y:rect.height/2 ))
        aPath2.move(to: CGPoint(x:0.0 , y:rect.height ))

        //Loop the array
        for _ in readFile.points{
                //Distance between points
                var x:CGFloat = 2.5
                //next location to draw
                aPath.move(to: CGPoint(x:aPath.currentPoint.x + x , y:aPath.currentPoint.y ))

                //y is the amplitude of each square
                aPath.addLine(to: CGPoint(x:aPath.currentPoint.x  , y:aPath.currentPoint.y - (readFile.points[f] * 70) - 1.0))


                x += 1
                f += 1

        //If you want to stroke it with a Orange color
        //If you want to fill it as well

        f = 0
        aPath2.move(to: CGPoint(x:0.0 , y:rect.height/2 ))

        //Reflection of waveform
        for _ in readFile.points{
            var x:CGFloat = 2.5
            aPath2.move(to: CGPoint(x:aPath2.currentPoint.x + x , y:aPath2.currentPoint.y ))

            //y is the amplitude of each square
            aPath2.addLine(to: CGPoint(x:aPath2.currentPoint.x  , y:aPath2.currentPoint.y - ((-1.0 * readFile.points[f]) * 50)))

            // aPath.close()

            x += 1
            f += 1

        //If you want to stroke it with a Orange color
        //Reflection and make it transparent
        aPath2.stroke(with: CGBlendMode.normal, alpha: 0.5)

        //If you want to fill it as well


Next step is go to the storyboard and create a UIVIEW and change the class to ‘DrawWaveform’

Build and Run.

Screen Shot 2017-03-13 at 8.38.38 PM

Here’s the Github Link

APPSTORE release and first sale!

Finally, my app ‘Loop maker’ it’s in the app store new and alive! It took me long time to build it since I got distracted with objective c and another framework that later was deprecated. It was a long process but I learned a lot from ux to low level core audio and dealing with the tedious appstore. I’m getting downloads but not in app purchases, maybe I should get better at marketing or make a bigger product. Anyway I feel great, proud, and energetic! I also I made my first sale, can I call myself an entrepreneur?

link for app: Shot 2017-03-07 at 4.07.17 PM.png

I presented my app to app developers meetup group and met many developers, it was nice to network. I noticed that I suck at presenting my own projects so I should work on my public speaking skills and my English.

Change of plans now! Haha wow life doesn’t go as planned isn’t… I had to give my parents money and I got offered an interesting job for my next rotation “Radio access network engineer”. The reason I say it’s a good option it’s because I’m moving to an apartment that its 680/month instead of 1200/month which aligns to my goals of being an entrepreneur. I’m not going to have to pay $125 for parking and $30 for the gym which brings my cost of living way low. I also finished paying off my car loan(12k) and next it’s my student loan(4k). 

My studio apartment will look like an office and I can already see friends saying “this is where you live?”, but I don’t care. I don’t care about traveling. I don’t care about having a beer after work. I don’t care about watching Netflix. I don’t care about politics. I don’t care about Religion. I don’t care about kids. I don’t care about the news. I don’t care about mortgages. I don’t care about the new Nintendo. I care about changing my life and I’m willing to work for it.

I’m already thinking on my next app idea…

Birthday month

November 12 was 26th birthday  and remember that drum machine I was trying to build in the beginning of 2016? I’m almost done with all the processing. I committed myself to learn some parts of core audio and the amazing audio engine 2(deprecated). I hired a graphic designer in upwork to do the user interface for me, focus on your strengths right? I still need to create the waveform logic, sequencer UI, menu integration and load audio from sample kits.

Creating apps is a very laborious work and it takes as 10x time to build if you don’t know what it takes. Sometimes it feels that I am going too slow and I haven’t release an app in a year, but I have to be patient as Gary Vee says.

Machine Learning

Another very interesting area  that I had been looking into for some time is Machine learning with audio or music also called Music Information Retrieval. After I completed and marketed my app I will study more of this subject and try to build a useful app with it. Everyone is talking about how robots are learning, going to take over the world and I see some great innovations with machine learning.

Digital signal processing helps in identifying features of a song such as pitch, tempo, etc… I feel that in Audio digital signal processing all the problems are already solved, but with machine learning I see how can we improve audio or music apps to be more intelligent and expressive. My dream is to have a profitable audio app and become an expert on my subject. I will do whatever it takes to keep pursuing it!


So as I’m writing this in the bus I had an interview yesterday to work from home in my next rotation with the current company I am. I honestly don’t care what kind of work I do as long I can optimize my life and save time working from home. My plan is to workout at lunch and live a more healthy life as I think going to a cubicle drains my energy.

April 1st is my next rotation to be uncomfortable again and meet new people that will push me to be better. An area that I’m lacking is going out on weekends, I just cant give up my social life, it’s a struggle to just be at home not meeting new people. Maybe going out isn’t the problem and drinking is since that takes a lot of my energy the next day. I need to solve that asap…

I’m obsessed with having a better life.











Climbing Core Audio


Core Audio

I encountered a huge roadblock to finish my toy app and that its ‘offline rendering’, I can’t do that with AVFoundation. So I had to revisit the book “Learning core audio” by Chris Adamson which I tried to read a while ago to only don’t understand anything. Now I was able to understand the book and create cool stuff such as reading Floats from an audio file and plot a waveform  happy. I think I’m barely starting to get momentum and that helps with learning concepts faster.


It’s very easily to get discouraged to know all the time/effort it takes to build something simple and see all the people that have done it already. The secret is to only focus on yourself and DO IT ANYWAY, you learn as you go. Another thing is that swift 3 is a new language and it adds excitement because something hasn’t been done in swift.

I code every day and try to go to bed knowing a little bit more about swift or audio. In my mind I keep telling that is like going to the gym/dieting, the more work you put in the more you get out. Even though I’m not a fitness enthusiast I’m an audio maniac!!!!!! I would love to just take a year off and do work every hour but I have loans to pay  .


There’s a of strong feeling of fulfillment when I’m doing my own thing, a feeling that I felt every day when I was making music/DJing when I was a teenager. Today that feeling is there when I put in work and I make a code work, or learned something that I can apply. Maybe that’s the reason people say “it’s about the journey, not the destination”.  You have to like what you’re doing and willing to do it every god damn day (notice I didn’t say passion).

I have a lot of fuel to change my life for the better, even though going to college and getting a good job already has provided me with %100 better conditions of living and opportunities… I want MORE. I want to be able to an expert in my field and be able to help people.

You have to do it and do it and do it and do it and do it and do it and do it and do it until the job gets done.