handmade.network » Forums » Work-in-Progress » A Dear ImGui music tracker
immortalx
John
15 posts
#21251 A Dear ImGui music tracker
6 days, 15 hours ago Edited by John on July 11, 2019, 4:10 a.m. Reason: Initial post

Hi everyone.

This is my first C++ project, which I've been working on for about a month now.

It's an attempt on making a very simple music tracker (or mod tracker if you will), or rather an experiment that'll help me get into the C/C++ world.
I'm not entirely new to programming, as I've used some VB6 in my youth and more recently GML. I finally overcame my fear of learning a more "proper" language, after my son encouraged me to watch together the Handmade Hero series.
I instantly became a fan, and although I stay into the comfort zone of using external libraries (like Dear ImGui and FMOD for this project), I'm slowly discovering memory manipulation, pointers, and all the lower level stuff.

As it stands, this tracker can create patterns/instruments, load samples, edit sample maps, and play-back the result. There's no saving/loading yet but I'm planning on doing a simple file format, as well as a wav export.

As soon as I have something a bit more usable I'll upload a working version here. For the time being here's a screenshot:
mrmixer
Simon Anciaux
633 posts
#21257 A Dear ImGui music tracker
5 days, 23 hours ago

I don't know much about music making, but this look nice for your first C++ project. You should put a recording (recorded with another application) in the post so we could ear how it sounds.
immortalx
John
15 posts
#21261 A Dear ImGui music tracker
5 days, 13 hours ago

Thank you very much Simon!
I'll definitely do a video capture, although my music creation skills are awful, despite having used trackers since the Amiga era :D

I also have to mention that playback is currently limited to playing "raw" notes, meaning that there's no implementation of effect commands, and volume/panning/mute/solo changes are only respected when a new note is triggered.
OliverMarsh
Oliver
129 posts / 3 projects

A budding game developer and programmer

#21263 A Dear ImGui music tracker
5 days, 10 hours ago

Congratulations on your first project, looks very cool! Cool hearing you watch handmade hero with your son.
immortalx
John
15 posts
#21267 A Dear ImGui music tracker
5 days, 2 hours ago

Thanks Oliver, yeah watching with my son is priceless!
immortalx
John
15 posts
#21269 A Dear ImGui music tracker
4 days, 2 hours ago

As per Simon's advice here's a capture of the program demonstrating my lack of music skills :D
mrmixer
Simon Anciaux
633 posts
#21277 A Dear ImGui music tracker
3 days, 6 hours ago

How much time did it take to make only the audio part (without the UI) ? I've been thinking about making something like that to easily add music/sounds in small games I make.
immortalx
John
15 posts
#21279 A Dear ImGui music tracker
3 days, 4 hours ago

Hi Simon!
I'm using the FMOD Core API which makes it very easy to load, play and set properties of sounds. My understanding is that it's higher level (but not under-powered) compared to other known libraries (PortAudio, RtAudio, OpenAL, etc) which makes it a perfect candidate for game audio programming.
So I'd say making the basic parts of the audio took very little time. And most of that time was me as a newbie trying to understand and handle pointers, which is what FMOD mostly gives you to work with.
mrmixer
Simon Anciaux
633 posts
#21282 A Dear ImGui music tracker
3 days, 2 hours ago

You mean you play audio samples for each notes ? You don't generate the sounds using a software oscillator ? For example generating a sine wave at 440hz to create a "La" (A) ?
immortalx
John
15 posts
#21284 A Dear ImGui music tracker
3 days, 1 hour ago

Indeed, every note is a loaded sample played at a different frequency. You can, of course, generate and play a sine wave if you wish. Most trackers though are sample-based and are in fact a form of a step sequencer.