Learning C++

Completely and utterly unrelated.

Moderators: raboof, MattKingUSA, khz

Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Learning C++

Post by Gps »

I have no idea how far I will get, but I have started to watch C++ you tube vids.

That brought back memories from school. Boolean operations.

It also reminds me of BASIC, all though the syntax is quite different, the principles are the same.

Store a value or string, then tell the computer what to do with it.

My Linux Distro, openSUSE tumblweed has GDB installed by default. I added this though:
gede - Qt-based GUI to GDB

If I recall right, 10 Print "Linux is awesome" will be cout << "Linux is awesome"

Its a start :P


Next will be to figure out simple math in C++ ( in basic something like LET=AxB, for X= 1 to 1000 next X )
Pretty sure I am already making a mistake there, but I am not gonna figure that out.
Need to forget about BASIC anyway.

For the younger people, Beginners All purpose Symbolic Instruction Code.
A very basic programming language, not used anymore as far as I know.

It does make me smile, that me messing in Basic to write a program, to calculate a two stroke exhaust pipe, is helping me to understand C++.

I am not worried about learning C++, what I am worried about is having to come up with code to achieve something.

How to go from, I want groove quantization in LMMS to actual code. I have this feeling, I am way in over my head. :lol:

I already subscribed to this page:
https://www.onlinegdb.com/
User avatar
d.healey
Established Member
Posts: 611
Joined: Fri Sep 22, 2017 8:33 pm
Has thanked: 279 times
Been thanked: 101 times

Re: Learning C++

Post by d.healey »

Why do you want to learn C++ specifically?
David Healey
YouTube - Free HISE scripting and sample library dev tutorials
Libre Wave - Freedom respecting instruments and effects.
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

I hope I can help some others, LMMS is on the list. They seem to need coders.

Beside that also for fun.

One of the LMMS devs also said they did not need more coders, but more code reviewers.
That sounds like something I might be able to do, if I learn some C++.

Rumor has it that there are even starter projects on the LMMS github. :lol:

Also that they are cleaning up the code, so all will confirm to the new rules the Devs agreed on.

Not sure if somebody can become a coder at my age, I do realize damn well, they is more to coding then learning C++. :)
folderol
Established Member
Posts: 2083
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 232 times
Been thanked: 400 times
Contact:

Re: Learning C++

Post by folderol »

1st off, you're never too old to learn something new. Also, the brain is like any other part of your body - the more exercise it gets the better it performs. I was in my 60s before I began on C++, I'm now 73 and one of the devs for Yoshimi. I don't get involved in the extreme mathematical bits though :lol:
The Yoshimi guy {apparently now an 'elderly'}
Basslint
Established Member
Posts: 1516
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 385 times
Been thanked: 299 times

Re: Learning C++

Post by Basslint »

My two (or even less) cents: If your goal is contributing to LMMS, I suggest you dive straight into Qt. It is a framework rather than a library and has its own little conventions and quirks that are not really generic C++. You will learn bits of "real" C++ as you go.

I say this because "real" C++ is a huge language with a lot of deprecated things, multiple paradigms and complex features. Even something as basic as a for loop might be "dated" nowadays, also you need to know various versions of the language which are almost completely different languages (just try to compare idiomatic C++03, still voluntarily used in some high-profile, cutting-edge projects like the Godot game engine, to idiomatic C++20!)
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

Yeah I need to learn qt too. :)

But first want to do some plain C++.

How to do some simple equations, then its qt time.

From the LMMS forum, one of the devs:

Its c++17, but with a UI-middlelayer named qT.

Still remember some of the issues I had with BASIC.
I wanted it to draw a graph, but that graph was resolution depended, and I could not figure out how to get around that. :)
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

folderol wrote: Sun Mar 20, 2022 8:08 am 1st off, you're never too old to learn something new. Also, the brain is like any other part of your body - the more exercise it gets the better it performs. I was in my 60s before I began on C++, I'm now 73 and one of the devs for Yoshimi. I don't get involved in the extreme mathematical bits though :lol:
Thank for the heads up, and I am almost 60, it will happen this year.

We have a saying over here (netherlands) the older the more crazy, or something like that. :P

Not worried about math, I also had boolean algebra at school.

Y= A AND not B and such. Cant type that here. B with a line above it. It was pneumatic related, but you learn this math also when you go into programming.

In theory you could build a pneumatic CPU, because every circuit you can do electric, you can also do pneumatic.
Control technology as its called.

A simple example is a dangerous machine, were you have to press two buttons for the machine too start.
Two hands so you cant stick your hands into the machine, while operating it.

Y= A and B in formula form.

More worried about other details in programming, but we will see.
Its better to try and fail, then to not even try.
folderol
Established Member
Posts: 2083
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 232 times
Been thanked: 400 times
Contact:

Re: Learning C++

Post by folderol »

Have you grabbed a copy of the code yet?
If not I suggest you do so, then start browsing around in it till you get a vague idea of what's going on.
Once you have an overall picture you can focus more on what you don't understand, at which point "Google is your friend" as people say :lol:

One of my first bug reports in Yoshimi was a control not working because of a faulty test. I can't remember exactly but it was something like:
if (x < 1 && x > 255)

It should have been:
if (x < 1 || x > 255)

More recent compilers would pick that up, but GCC in 2009 wouldn't.
The Yoshimi guy {apparently now an 'elderly'}
tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 374 times
Been thanked: 209 times
Contact:

Re: Learning C++

Post by tavasti »

Gps wrote: Sun Mar 20, 2022 12:41 am I hope I can help some others, LMMS is on the list. They seem to need coders.
Yeah, that most likely is true. I started to make 'tutorial for making music with computer' (in Finnish), and selected LMMS. Arpeggiator is broken. It worked in older versions, but now had been broken for several years. Indeed developers needed :-)

I know C++, but I don't think I will start working with fixing this. I do my course without arpeggiator :-)

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

tseaver
Established Member
Posts: 408
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 11 times
Been thanked: 102 times

Re: Learning C++

Post by tseaver »

FWIW, I made my full-time living with C++ between 1995 and 2000[1], and I would today claim *no* familiarity with the language as it is currently used: the language and library standards have had too many changes, and I don't have the appetite to catch up on all of them.

As others have said, if you want to contribute to a particular project, you need to focus on the subset of all-the-possible-C++-idioms-and-features used by that project, which is still going to be a much smaller subset than the whole landscape.

[1] As an ironic difference, I've been making my living full-time with Python since 2000.
Ubuntu, Mixbus32C; acoustic blues / country / jazz
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

I am already asking on the LMMS forum, what I exactly need to install, except GDB because that's already installed.

Right now don't have a clue on what part of qt I need to install. And the version will probably matter too.
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

tavasti wrote: Sun Mar 20, 2022 9:07 pm
Gps wrote: Sun Mar 20, 2022 12:41 am I hope I can help some others, LMMS is on the list. They seem to need coders.
Yeah, that most likely is true. I started to make 'tutorial for making music with computer' (in Finnish), and selected LMMS. Arpeggiator is broken. It worked in older versions, but now had been broken for several years. Indeed developers needed :-)

I know C++, but I don't think I will start working with fixing this. I do my course without arpeggiator :-)
First want to learn some basic C++
Then the qt part, and then download the source code.

I already know, how to put this friendly, that the code is a challenge.

I often use vst like synth 1, and as far as I can tell that arpeggio works fine.

I am worried I lack the skill to fix that kind of stuff, but we will see.


The only things I miss in LMMS, LV2 support, groove quantization / swing / humanization.
The latest beta has LV2 support, and there is talk on the github about those other 3 features.
tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 374 times
Been thanked: 209 times
Contact:

Re: Learning C++

Post by tavasti »

Gps wrote: Mon Mar 21, 2022 4:31 am I often use vst like synth 1, and as far as I can tell that arpeggio works fine.
Take a look on this:
https://www.youtube.com/watch?v=wX1j_rxOwoM

No, this is not how arp should work :-)

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

tavasti wrote: Mon Mar 21, 2022 7:08 am
Gps wrote: Mon Mar 21, 2022 4:31 am I often use vst like synth 1, and as far as I can tell that arpeggio works fine.
Take a look on this:
https://www.youtube.com/watch?v=wX1j_rxOwoM

No, this is not how arp should work :-)
Watched to vid and that does not sound right.
I am assuming you already filed a bug report ? :)

I think the chord option is causing it.
Gps
Established Member
Posts: 1161
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 351 times
Been thanked: 113 times

Re: Learning C++

Post by Gps »

A LMMS devs commented and he claims you are not using it right, and something about it works different from what some expect.

https://www.youtube.com/watch?v=qBN6Hjom6S0&t=1s
Post Reply