Skip to content

Should I write my visual oscillator in C or Java?

January 11, 2012

Am thinking right now about actually getting started doing this.

Pros of using C

  • I am already quite familiar with the GTK+ library.
  • It’s what I’ve been using for the last several months, so I’m familiar with the syntax etc.
  • I can just dive in to doing this.
  • Possibly more useful for turning into real sound. (There’d be a library for C that I could use?).

Cons of using C

  • Difficulty with memory allocation, arrays. I don’t want this project to turn into spaghetti code.
  • No classes.
  • C is generally more work?

Pros of using Java

  • Classes!
  • Lists!
  • Object Orientated.

Cons of using Java

  • I haven’t used it in a while. Will have to brush up on the syntax.
  • I’m not particularly familiar with the Java GUI libraries. Though all widgets based stuff is pretty similar?

I think basically what it’s coming down to is:
On one hand, C is going to be easier for me to start with. But it might be harder in the long run.

And: On one hand C might give me more control of things I can do when it comes to producing sound. On the other hand – it’ll be harder to use.

Also: Java is going to be easier to right tidy nice code. C will require more thinking about things before hand.

Just read this thread at the Ableton forums.

Any audio apps should be in C++ or ASM…. anything else is too slow.

The code has to loop around grabbing incoming samples and processing
them, which if you know code isn’t a great thing…. The constant looping
means the closer you get to bare bones the better.

Using C++ means you can port it to Mac and PC without too much trouble.

Using ASM means you’re up for some self mutilation :-)

Using Java means you were caught up in the hype and fell for a shit
language. Using VB means you just don’t have the right tool for the job.
Using C means you really should go OO with C++ to save your life. Using
some drag objects around connect wires BS means you’re using another
engine to create yours and just adding more processing and latency into
the mix.


Certainly – if I knew C++ I would be using it. But I don’t, and I’m not about to start.

Well, I’ve certainly put off actually writing code rather successfully.
It’s now 6:22pm. – I could start writing this in C, get it started.
Or I could do it tomorrow. ‘Let my mind mull things over’.
Ok, I think I’m going to write another blog post.


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: