uTracker, a noob's toy tracker project

Started by immortalx, August 05, 2019, 16:52:13

Previous topic - Next topic

immortalx

EDIT: Released the source code, see further down.

Hey everyone!

A bit of background: Long time OpenMPT/Modplug user here, not a tracker-junkie but I've been familiar with trackers since the Amiga era. I'm not entirely new to programming as I've used almost every 8-bit BASIC flavor in my youth and some VB6.0 later on, but have done nothing serious, never learned proper programming, and never moved to a more standard/advanced programming language.
My son is now at the uni learning computer-science and has convinced me to try and learn some C++. I was VERY scared at first, but it seems I'm slowly getting somewhere. I've made an attempt in the past to write a very simple tracker in VB6 and failed miserably. And not because of the language, but because I've never programmed for prolonged periods and whenever I had the "itch", I had to go back and re-learn the basics.
Now I'm trying to write this in C++ and I'm already 2 months in, so that's progress for my standards  ;D

Anyway, this is a very-very basic tracker-like program which is mostly featureless, but at least it's being able to play-back some notes. Many things are not implemented yet and I just have placeholders for them. Most basic of the missing features is, sadly, no effect commands which I don't know if and how I'm going to make them work. There's a very crude file format that allows you to save/load your work, but it doesn't contain the samples and they are just referenced as absolute paths. It's also very CPU intensive (esp on play) and should crash a lot  ;D

Finally it's windows only, sadly, because I'm too new to even start thinking about cross-platform.
My deepest appreciation to the developers of our beloved OpenMPT, which has managed to stay alive and kicking, and I cannot begin to imagine the amount of work that was put into it!

Download it here:
https://dl.dropbox.com/s/evr6zgni6mzeehg/utracker_v0.1.rar?dl=0



Gerirish

Creating a new tracker is like reinventing the wheel.

A different approach is to ask SagaMusix and/or manx (see below) if there are coding tasks for your level of knowledge where you can help with.

Means you would start to understand the architecture of a bigger C++ project (= OpenMPT) with the possibility to contribute to an already established and well-known tracker.

SagaMusix: https://forum.openmpt.org/index.php?action=profile;u=1711
manx: https://forum.openmpt.org/index.php?action=profile;u=4486

Saga Musix

I think that's a bit of a harsh reply. There are many reasons for creating a new tracker, including:

1. For the learning effect. A new tracker brings many valuable insights to the implementer, even if it doesn't grow beyond the alpha stage. In particular, implementing your own tracker teaches you how a mixer works, how sample interpolation is done, file (de)serialization and many other things. If you just look at someone else's (my) code, the learning effect will be much lower, in particular if there is no need for rewriting that code. OpenMPT is a complex piece of software and getting your feet wet in C++ with the OpenMPT code might really not be the best way to learn the language or learn about trackers in general. For someone who's new to the matter or the language, OpenMPT's code will most likely be even more overwhelming now than it was for me eleven years ago.

2. For realizing something that cannot be done (or would be complicated to do) with other trackers. There are many interesting features that even I would like to see but OpenMPT's concept locks us into a very specific corner which prevents certain things from being implemented, or at least makes it incredibly hard and would make the code unreasonably complex.

3. Or simply because you want a challenge.

In the end, it's their spare time, let them spend it the way they want. Often new trackers can bring a fresh breeze of new ideas without the existing trackers couldn't evolve. As an OpenMPT developer and contributor to Schism and MilkyTracker, I certainly do not want us to drift into a tracker monopoly.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Gerirish

Sorry, if my reply came across as harsh.

You are right with everything in your reply.

Only speaking for and knowing myself, it wouldn't give me a purpose to write a big piece of software such as a tracker. Instead I would start out by joining an already existing project by working on small fixes, improvements.....

immortalx

@Gerisish You are right in that this is re-inventing the wheel, in fact a very not round wheel in my case  ;)
But, believe it or not, it is very satisfactory for an old guy like me to have a little learn-by-mistake coding project, instead of watching programming tutorial videos.
My intention is not to make a tracker as a replacement for other trackers, of course. That would be very rude of me to even think about! And regarding your suggestion about contributing to the OpenMpt codebase, I'll just say that my level of knowledge is very close to zero  :P

@Saga Musix, thank you very much for the reply! Your points make absolute sense, because indeed I mostly wanted to toy around with ideas, and in the process try to learn about the language .

TheRealByteraver

Hi! Just wanted to say I like the aesthetic of your tracker so far :). It seems you got pretty far for somebody that is only two months into C++, that is quite impressive, since Windows programming is not necessarily easy, especially in C(++). For anything graphical I personally use Chili's directX framework (www.planetchili.net). Chili built a community for aspiring c++ game programmers, with youtube video's, a forum, discord channel etc. The video's are really good and fun to watch, I wholeheartedly recommend them.

While rebuilding your own ModPlug Tracker equivalent is indeed daunting and not really useful, you should be able to create a fun little tracker for .mod files only for example. As .mod files do not implement instruments, this should be an achievable goal even for you. Simplicity has its own appeal, and a small tracker that does that one task (.mod tracking) very well could be a nifty tool indeed. And there is always the satisfaction of using your own tools :D

Do not be intimidated by the effects, start with implementing one, and before you know it you'll get half of them working. The documentation of ModPlug Tracker is a great reference, and if you're really stuck there is always the forum(s).

phanoo

I like a lot your interface ! It has a very modern look.
Useful reasons to create a tracker from scratch are multiple, it's never useless since you'll learn a lot and there will be probably people using it because they like the interface or the features more than what's available elsewhere.

I started creating FM Composer for fun which is a tracker with a built-in FM synthesizer, it ended up being used by quite a few musicians, some of them creating entire albums with it...




immortalx

Sorry for the late reply guys, I totally missed the last 2 posts. I didn't get any email notification at all for some reason.

@TheRealByteraver thanks for the framework suggestion, I'll take a look at it! Also using the .mod format makes sense. I took a look at other formats and they were too complex for me to even think of parsing.

@phanoo thanks for the nice words. I'm aware of FM Composer of course! Now THAT'S a real tracker and such a fantastic piece of software.

Since my first post I totally abandoned this project, realizing it has fundamental flaws mainly due to my luck of basic sound knowledge, and also because as I already mentioned I'm a programming noob, not being able for anything bigger than this.
I've no reason to keep this to myself so I'm releasing the source for anyone who wants to tinker with it.
WARNING: It's really ugly inside  ;D
https://github.com/immortalx74/utracker

Saga Musix

It's always nice to see people putting their efforts online. I had a very brief look at the code, and while you say that it's abandoned, maybe you still want to learn something from it: I'd recommend not to store pattern data as strings. While it might make pattern display drawing slightly more simple, it also makes everything more error-prone because you keep comparing against magic values everywhere. Consider using an integer value and have an enum with special values for actions such as note-off.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

immortalx

Thank you so much @Saga Musix, I really appreciate your input! That's one of the reasons I stopped developing it. So many embarrassing rookie mistakes, and hopefully I've learned a lot since then (including avoiding magic numbers).
My newest experiment is a simple emacs-style text editor and I'm confident enough that I'm doing a lot better this time!

Saga Musix

That's the most important thing, learning from your mistakes. But you don't have to move on to a different project to do that, you can always fix them in the existing code. ;) I did the same as my knowledge in C++ widened and I continued to develop OpenMPT.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

immortalx

You're right Saga, I might revisit it in the future. For the time being I simply lost interest and felt a bit embarrassed with my mistakes in that project, so I wanted to start something from scratch. Also I'm a bit old-aged and my attention span is on the low side  ;D