LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.13k stars 1.01k forks source link

New buttons for Organic #968

Open DeRobyJ opened 10 years ago

DeRobyJ commented 10 years ago

Hi, Just tried 1.0.92 with fixed Organic. It's awesome and I've got some little ideas to make it even better!

The randomize button creates a whole new organ ready to be played, by setting defaults Harm/Pad/Wide and actually randomizing only Wave/Vol.

Three things:

I'm so exited about Organic, it's so cool now!

Sti2nd commented 10 years ago

My suggestion of "Selective randomizing": if you CTRL + drag the randomize button to an oscillator name that oscillator would be randomized, if you drag it to an option like wave or pan, those knobs would be randomized.

DeRobyJ commented 10 years ago

This could also be a way, but I think it would be less easy to find. On the other side, it would prevent people to break their preset by just clicking the new buttons without knowing.

So yea, maybe it's better what you said.

tresf commented 10 years ago

Filing this one as an enhancement. I actually agree that some of these enhancements could make the instrument even better. If you feel inclined to change some code please do, or else it will be a while (if ever) before this one is worked on.

diizy commented 10 years ago

On 08/24/2014 09:20 AM, Tres Finocchiaro wrote:

Filing this one as an enhancement. I actually agree that some of these enhancements could make the instrument even better. If you feel inclined to change some code please do, or else it will be a while (if ever) before this one is worked on.

Yep. I have too much on my plate to be able to implement things like this, but if anyone is interested, I can outline the steps to make this happen:

  1. Go to the lmms-artwork repository where you will find the source files for the new Organic graphics. Take the labels from the graphic, and convert them into button graphics, the same way other buttons have graphics - you can look at how other buttons work to see how to do it.
  2. Write the UI code for new buttons. Make sure to align them properly in the layout: for this, you'll need expertise with both C++, Qt and GIMP (or other raster graphics software).
  3. The class to use for buttons is pixmapButton. You don't need to associate them with Models, since they don't need to be automatable and don't store any value data.
  4. (for each button) Connect the "clicked()" signal of the pixmapButton to a slot on the Instrument object (the object that inherits the Instrument class in Organic, probably named OrganicInstrument or something).
  5. In each slot, write the code for randomizing the values you want to randomize. Set the values to the corresponding models by modelname->setValue().
  6. The models are a bit tricky in Organic - they're stored in the OscillatorObject. Looking at the code should be able to tell you which is which.

And... that's about it. Note again that you'll need pretty solid knowledge of C++, Qt and some graphics knowhow.