Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: [1]   Go Down

Author Topic: How/With what was the Milkytracker GUI built?  (Read 16051 times)

0 Members and 1 Guest are viewing this topic.

phate

  • New User
  • Offline Offline
  • Posts: 19
    • View Profile
How/With what was the Milkytracker GUI built?
« on: October 12, 2008, 20:42:56 »

I'm going to be building my own tracker for generating CSound scores, and so I need a simple-yet-effective way to build a GUI. Milkytracker is probably one of the most aesthetically pleasing trackers I've had the pleasure of using, and so I thought it would be a good idea to ask here first.
Logged

Deltafire

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 196
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #1 on: October 12, 2008, 21:29:36 »

Pailes wrote his own GUI implementation for Milkytracker (called PPUI).  You could use this if you wanted (as long as you follow the conditions of the GNU licence) but tbh, you may be better using something which is better documented and more widely used.

Choosing a GUI library (or whether to write your own custom GUI) is a bit of a mindfield, and depends upon your choice of programming language, operating system etc.  I'm not recommending any of these, but here are some I know of:

Windows:
Win32 API
MFC
Windows Forms (nice for .NET apps)

Linux/cross platform:
GTK
QT
WxWidgets
Fast Light Toolkit (FLTK)


Good luck :)
Logged

phate

  • New User
  • Offline Offline
  • Posts: 19
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #2 on: October 13, 2008, 16:24:52 »

Thanks for all the info. What was PPUI built on, though? I imagine it must be based on some sort of primitive window/drawing API.

I'll check out some of those, though. I'll probably choose whatever one offers the most in the way of simple hotkey-mappng and a nice looking (and customizable) UI, since everything else ought to be fairly negotiable.
Logged

pailes

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 287
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #3 on: October 14, 2008, 20:28:46 »

Currently PPUI uses a bitmap context where any graphic operation results in low level bitmap manipulations. Each drawing operation is done in software in a rectangular area of the bitmap context. When drawing has finished the area is made visible by OS dependent update code. It is also possible to do rendering with OpenGL for example.

On top of this a basic widget set is provided: Buttons, Sliders, Text Boxes, List Boxes etc. There is also some basic kind of event distribution which takes raw user input events from the OS and distributes it to the widgets which are contained in a window. Basically it is written like most widget systems but in a much more simple and straight forward way. It was only written for MilkyTracker, for nothing else, that's why it's not very well documented.

Nevertheless it's a fun thing to do and if you enjoy programming like myself, you might also enjoy writing your own GUI system, hehe ;)
Logged

phate

  • New User
  • Offline Offline
  • Posts: 19
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #4 on: October 14, 2008, 21:39:18 »

I've been learning how to use GTK+, but it's very discouraging. It doesn't seem like any of the widgets are all that useful for building a tracker UI.

However, building my own UI sounds like an imposing-yet-fun project. It would be interesting, and to be honest, it's what I'd rather be doing. However, there are a few things that I'm not so clear on. For instance, if you're doing everything by rendering a bitmap, that would mean that all of the video processing is being done by the CPU, yes?

Also, what would be the most effective way to render that to the screen afterwards? How do you keep track of mouse clicks and what would be the best way to keep this project platform-independent?

I presume I would end up writing my own font renderer as well...

Sorry for pummeling you with questions, but I'm at a bit of a loss. I spend most of my time programming micro controllers and the DS, so I'm very lost when it comes time to deal with an operating system, much less a bunch of them.
Logged

pailes

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 287
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #5 on: October 14, 2008, 22:32:52 »

I've been learning how to use GTK+, but it's very discouraging. It doesn't seem like any of the widgets are all that useful for building a tracker UI.

I don't know GTK+ very well, but if you decide to do things yourself, you usually end up in getting exactly what you want ;) And if you mess things up you're the one to blame and not somebody else. Hello NIH-syndrome :)

Quote from: phate
However, building my own UI sounds like an imposing-yet-fun project. It would be interesting, and to be honest, it's what I'd rather be doing. However, there are a few things that I'm not so clear on. For instance, if you're doing everything by rendering a bitmap, that would mean that all of the video processing is being done by the CPU, yes?

Yes everything is done by the CPU, but as you can see with MilkyTracker it's not a big deal these days. I admit that MilkyTracker eats up more cycles this way, but it's a very portable approach.

Quote from: phate
Also, what would be the most effective way to render that to the screen afterwards? How do you keep track of mouse clicks and what would be the best way to keep this project platform-independent?

Well the screen updates are done by the underlying graphics subsystem of the "OS". For windows this is GDI, on Linux SDL is used, but basically you can switch to anything that can draw images into video memory.

Basically it's a typical frontend/backend relation, you write a few OS dependent backends and the keep the rest platform independent.

Quote from: phate
I presume I would end up writing my own font renderer as well...

MilkyTracker does so, because it deals with fixed size bitmap fonts, which are very easy to render. If you want more sophisticated font rendering check out the Freetype library.
Logged

phate

  • New User
  • Offline Offline
  • Posts: 19
    • View Profile
Re: How/With what was the Milkytracker GUI built?
« Reply #6 on: October 15, 2008, 04:41:39 »

Thanks a ton for all of the help. I've actually been messing around with SDL for a bezier curve drawing app, so that works out perfectly. I was just worried about efficiency, but seeing as how Milkytracker runs quite reliably on my 3G iMac, I guess there isn't much to worry about.

Maybe I'll even figure out Cairo and make my own vector-graphics based tracker GUI API or something. I've always wanted to work on a modular MIDI tracker for use with PureData, and I suppose this would be the perfect opportunity.
Logged

stylwarz

  • New User
  • Offline Offline
  • Posts: 2
    • View Profile
    • pineapple tracker
Re: How/With what was the Milkytracker GUI built?
« Reply #7 on: July 27, 2009, 01:18:08 »

Hey phate... have you heard of this tracker front-end to csound called dex-tracker? http://sourceforge.net/projects/dex-tracker/

Where are you on your tracker gui dilemma? Are you writing your own? Using ppui/something else? I ask because I'm writing a tracker myself. I recently decided that i want to use graphics other than text characters (I've been using curses) and i'm looking for a way to make some widgets and stuff. The idea of making my own GUI toolkit from scratch like ppui is very appealing to me, but I'm not a very good programmer. I'm still going to try, though. Maybe I will learn something!


bigup
 :police: :police: :police:
-n
Logged
Pages: [1]   Go Up