djdiskmachine / LittleGPTracker

Little Piggy Tracker, LittleGPTracker feature improved
Other
113 stars 22 forks source link

Scale Helper Tool #119

Closed clsource closed 6 days ago

clsource commented 1 month ago

Borrowing ideas from the Lovely Composer tool. They have a "Scale Function" which helps in song composition.

Example scale: C F G

Will only allow notes C, F and G in any octave for this phrase

Some ideas for implementing this:

This is just an aid for writing notes.

Sample scales.xml

<SCALES>
    <SCALE value="C Major">
        <NOTE value="C" />
        <NOTE value="D" />
        <NOTE value="E" />
        <NOTE value="F" />
        <NOTE value="G" />
        <NOTE value="A" />
         <NOTE value="B" />
    </SCALE>
   <SCALE value="C Minor">
        <NOTE value="C" />
        <NOTE value="D" />
        <NOTE value="D#" />
        <NOTE value="F" />
        <NOTE value="G" />
        <NOTE value="G#" />
        <NOTE value="A#" />
    </SCALE>
   <SCALE value="Black Keys">
        <NOTE value="C#" />
        <NOTE value="D#" />
        <NOTE value="F#" />
        <NOTE value="G#" />
        <NOTE value="A#" />
    </SCALE>
   <!-- https://pianoencyclopedia.com/scales/ryukyu/C-ryukyu.html -->
    <SCALE value="C Ryukyu">
        <NOTE value="C" />
        <NOTE value="E" />
        <NOTE value="F" />
        <NOTE value="G" />
        <NOTE value="B" />
    </SCALE>
  <!-- https://pianoencyclopedia.com/scales/yo-shomyo-gagaku/C-yo-shomyo-gagaku.html -->
    <SCALE value="C Gagaku">
        <NOTE value="C" />
        <NOTE value="D" />
        <NOTE value="F" />
        <NOTE value="G" />
        <NOTE value="A" />
    </SCALE>
    <!-- https://pianoencyclopedia.com/scales/whole-tone-i/C-whole-tone-i.html -->
    <SCALE value="C WholeTone">
        <NOTE value="C" />
        <NOTE value="D" />
        <NOTE value="E" />
        <NOTE value="F#" />
        <NOTE value="G#" />
        <NOTE value="A#" />
    </SCALE>
  <!-- https://www.scales-chords.com/chord/piano/Daug -->
   <SCALE value="D aug">
        <NOTE value="D" />
        <NOTE value="F#" />
        <NOTE value="A#" />
    </SCALE>
    <!-- https://pianoencyclopedia.com/scales/lydian/C-lydian.html -->
    <SCALE value="C Lydian">
        <NOTE value="C" />
        <NOTE value="D" />
        <NOTE value="E" />
        <NOTE value="F#" />
        <NOTE value="G" />
        <NOTE value="A" />
        <NOTE value="B" />
    </SCALE>
</SCALE>
clsource commented 1 month ago

The idea can be executed like this In the Phrase Screen imagen

The scale can be applied to any instrument since its a handy tool in Phrase Screen.

Captura de Pantalla 2024-09-12 a la(s) 10 33 51

djdiskmachine commented 1 month ago

I very much like the idea of having user-configurable scales, config.xml could be a good place for this as long as it doesn't cause issues for older versions. The bigger question is about implementation. Being able to have individual scales per phrase is an interesting idea, not necessarily a pain to implement.. However I'm a little bit skeptical about how user friendly this would be for the average, not Jazz-schooled, tracker user.

clsource commented 1 month ago

Maybe not scale per phrase but scale per project. In that way you can be on scale in every phrase. So to ease things, would be a global scale option that you can use to quickly enter notes within a scale.

One thing that would be cool but I dont know how to implement is playing the notes with an instrument, so when you select the scale or increase or decrease semitones you can hear how the instrument plays the notes.

Maybe if the current selected row has an instrument defined, then use that for preview the scale sounds from C3

djdiskmachine commented 1 month ago

Per project is no problem and very doable. Picotracker has this functionality already, maybe have a look over there for some inspiration ;)

I'd definitely vouch for scale selection in the project menu though.

Note preview is added since 1.4.1

clsource commented 1 month ago

I was unable to compile picotracker also only found this related to scales https://github.com/xiphonics/picoTracker/issues/39

maks commented 1 month ago

@clsource picoTracker already has a working scales implementation. As a starting point, look at the UI config for the feature in: https://github.com/xiphonics/picoTracker/blob/master/sources/Application/Views/ProjectView.cpp#L73-L81

maks commented 1 month ago

And yes likewise picoTracker has had not playback on change in the PhraseView for quite a long time now too, great job @djdiskmachine to see you added it in LGPT too 👍🏻

clsource commented 1 month ago

imagen imagen

djdiskmachine commented 1 month ago

imagen imagen

How does this look if adding a command in one of the fx columns?

clsource commented 1 month ago

imagen

Does not overlap :D

djdiskmachine commented 1 month ago

That's pretty busy looking. I'd like to keep this space as uncluttered as possible.

clsource commented 1 month ago

Ok how about this

imagen

djdiskmachine commented 1 month ago

Two things:

  1. I don't understand what this text adds to the feature seeing as scale selection already limits the note input to the notes in the scale.
  2. I want as little text on screen as possible, and any text that is being displayed to be contextual. This is due to limited screen space, piggy supports many platforms and some have a smaller resolution than the desktop version you're using.
clsource commented 1 month ago

ok removed that feature. but commented it in the code if someone wants to activate it by custom build.

clsource commented 6 days ago

Implemented