Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New arpeggiator functions #2080

Open
4 of 7 tasks
zonkmachine opened this issue Jun 3, 2015 · 25 comments
Open
4 of 7 tasks

New arpeggiator functions #2080

zonkmachine opened this issue Jun 3, 2015 · 25 comments
Assignees

Comments

@zonkmachine
Copy link
Member

zonkmachine commented Jun 3, 2015

Yo!

I'm updating the source from pull request #687 and am preparing a brand new pull request. It still lacks a proper GUI though and I'm looking into it.
The functionality we need here is similar to what's going on in the plug-in 'Mallets', which switches layout depending on which instrument you select.

arpeggiator

REP / Repeat
Note repeats this number of times.

CYCLE
Will skip over this number of notes, spreading them out over the range. It might get stuck and bounce between just a couple of notes if the length of the range / jump length favors this. Not a bug. :-)

SCR / Scramble
Not implemented. I was thinking of adding the function to dial in the start key.

SKIP
Dial in the probability that the note will be skipped altogether.

MISS
Dedides the probability that the note will be a random one instead.

FLOOR
All notes under this will be assigned the floor / lowest note instead.

CEIL / Ceiling
Same as floor but sets upper limit. In the event you set FLOOR higher than CEIL, the later function, CEIL has precedence and sets the note.


Functions

@Wallacoloo
Copy link
Member

Huh. This is an interesting idea. I don't actually use arpeggiators when sequencing. But I do occasionally use them when doing improv stuff in private.

I really can't judge how useful these features will be before trying them (and I would definitely fiddle around for them a bit once they're ready). It seems that they could be really great for certain niches though. My only concern is that it will make the interface look more complex to anyone not yet familiar with these features. Therefore it might be worth adding an "Advanced mode" checkbox (default disabled) that shows or hides these controls, or something along those lines.

To my knowledge, we are indeed in a feature freeze. But this feature seems totally reasonable for the next minor version (1.3).

@tresf
Copy link
Member

tresf commented Jun 3, 2015

Will skip over this number of notes, spreading them out over the range. It might get stuck and bounce between just a couple of notes if the length of the range / jump length favors this. Not a bug. :-)

This one is the big win in my opinion per #1836.

Related #1298 #340 #1836 #687 (previously linked)

My only concern is that it will make the interface look more complex to anyone not yet familiar with these features. Therefore it might be worth adding an "Advanced mode" checkbox (default disabled) that shows or hides these controls, or something along those lines.

I tend to agree with the complexity observation, but mostly because this is a default tab for most instruments and we should make the most commonly used ARP features easier to locate if possible.

Also, @zonkmachine thanks for taking the time to work on this! 👍 🍻

@theguitarplayer
Copy link

While you are on the topic of the arpeggiation function, I had the idea of choosing a certain key and then making all the arpeggios played to be in that certain key. Right now, we only have the option to choose types of arps like maj, min, etc. But my idea is for every note that is arpegiated, the arpeggios stay in the key. That means, no major arpeggio in a minor key, unless it is your v chord. (raise 7th).

@zonkmachine
Copy link
Member Author

My only concern is that it will make the interface look more complex to anyone not yet familiar with these features.

This was also the main concern with the previous pull request. I'm trying out an advanced switch right now and for the time being it resides in the 'Settings' menu.

I had the idea of choosing a certain key and then making all the arpeggios played to be in that certain key. Right now, we only have the option to choose types of arps like maj, min, etc. But my idea is for every note that is arpegiated, the arpeggios stay in the key. That means, no major arpeggio in a minor key, unless it is your v chord. (raise 7th).

This is a separate topic but a good one. We could make something like a 'master key track' that you can choose from the arpeggiator menu.

@zonkmachine
Copy link
Member Author

This is what it looks like in it's current incarnation.

arpeggiatorx

@tresf
Copy link
Member

tresf commented Jun 23, 2015

This looks pretty good and it is much simpler than the originally proposed idea. I vote to make it default and skip the settings dialog altogether.

-Tres

@zonkmachine
Copy link
Member Author

Yes, but this is only a selection of the functions to try out the settings dialog, sorry for being unclear. I agree that this could be a good new default but I can think of a whole lot more to do if I can figure out a good gui solution.

@tresf
Copy link
Member

tresf commented Sep 17, 2015

My only concern is that it will make the interface look more complex to anyone not yet familiar with these features. Therefore it might be worth adding an "Advanced mode" checkbox (default disabled) that shows or hides these controls, or something along those lines.

@Wallacoloo @Umcaruje @curlymorphic thoughts on merging this for 1.2?

@zonkmachine this will require a rebase prior to merging.

@Wallacoloo
Copy link
Member

@tresf I have no objections to merging this in 1.2 if it still looks like the latest screenshot @zonkmachine posted (#2080 (comment)), and assuming the code is clean, etc (looks fine at a glance).

Did you see the comment about the skip function muting notes? #2130 (comment) This makes me a little hesitant, as it does feel like a hack, but it is at least properly documented in the source code and its scope is narrow enough to where it shouldn't cause long-term problems.

@burtonsamograd
Copy link

I'm all for more options being added to the arps. I use them all the time.

@curlymorphic
Copy link
Contributor

I feel this is a good addition, I think it's a great idea to go in 1.2. I have looked over the code, and It appears to be fine.

@tresf
Copy link
Member

tresf commented Sep 17, 2015

Is there a reason why this needs yet another setting button? I hate hidden features in software and I'm not sure I understand why we'd have all of the logic to disable this for. Can we just add this feature to all instruments?

@zonkmachine
Copy link
Member Author

Is there a reason why this needs yet another setting button?

No. I have fixed this already but haven't pushed it.

Did you see the comment about the skip function muting notes? #2130 (comment) This makes me a little hesitant, as it does feel like a hack, but it is at least properly documented in the source code and its scope is narrow enough to where it shouldn't cause long-term problem

The only thing I've found with this is that 'skip' doesn't work with lb302. The notes still play though so it's a minor nuisance.
I'll try and push the latest code tonight.

@Umcaruje
Copy link
Member

I think this will be a nice addition to 1.2 too.

@zonkmachine
Copy link
Member Author

#2130 updated

@zonkmachine zonkmachine self-assigned this Jan 20, 2016
@zonkmachine zonkmachine added this to the 1.3.0 milestone Feb 19, 2016
@Rikislav
Copy link

Rikislav commented Oct 28, 2016

Hi,
First I wanted to congratulate the developers for their work, it's really amazing and it works perfect!

I'm a big fan of the arpeggios the way are dealt here and use them a lot: it's amazing what can you achieve by combining arpeggios with tempo syncing, the new functions etc...
I hope my following suggestion here isn't too naive, and forgive me if it has already been proposed.

As it is the arpeggio tab is powerful enough to be used as an extension of the instrument itself, I use it as a kind of note-machine, an automated sequencer: since I wanted more scales or note repetitions I am used to intervene into the code by adding to the chordtable (InstrumentFunctions.cpp) arbitrary arrays of notes (eg.

{ QT_TRANSLATE_NOOP( "InstrumentFunctionNoteStacking", "rik" ), { 0, -1, -1, 4, 4, -100 } }
and changing logic into stopping the sequence when it reaches -100 instead of -1 as to let use also the -1 semitone

if( semi_tones[m_size] == -100 ) { break; }

so, my suggestion would be to give the user the possibility of writing his own sequences: reading data from a simple text file instead of hardcoding them would allow anyone to write his own arpeggios. In time, setting up a simple lmms editor shouldn't be too demanding or why not? reconsider the whole thing by adding the capability to change the length, panning, velocity etc. of the single note...

Thank you again for all the work, it's wonderful!!
R.

@tresf
Copy link
Member

tresf commented Oct 28, 2016

changing logic into stopping the sequence when it reaches -100 instead of -1 as to let use also the -1 semitone

Why not just stop it when it reaches the end?

@zonkmachine
Copy link
Member Author

zonkmachine commented Oct 28, 2016

2016-10-28 22:34 GMT+02:00 Tres Finocchiaro [email protected]:

changing logic into stopping the sequence when it reaches -100 instead of
-1 as to let use also the -1 semitone

Why not just stop it when it reaches the end?

The -1 is an identifier for the "end of chord/scale" so if you want to add
a scale that use one semitone below the base note (and you can add for
instance -2 and the arpeggiator will totally get it right) that won't work.
-100 is below what you would use so it would give you more freedom. Good
thinking.

@tresf
Copy link
Member

tresf commented Oct 28, 2016

The -1 is an identifier for the "end of chord/scale"

It is now, but why? What benefit does this have on the logic versus ridding of it?

screen shot 2016-10-28 at 5 35 21 pm

@tresf
Copy link
Member

tresf commented Oct 28, 2016

use one semitone below the base note (and you can add for
instance -2 and the arpeggiator will totally get it right) that won't work.
-100 is below what you would use so it would give you more freedom.

I thought arpeggio does notes, not semitones. What is special about 100 notes?

@Rikislav
Copy link

Rikislav commented Oct 28, 2016

It is now, but why? What benefit does this have on the logic versus ridding of it?

While trying I thought the same, but it seems to me that as it is now

for( m_size = 0; m_size < MAX_CHORD_POLYPHONY; m_size++ ) { if( semi_tones[m_size] == -100 ) { break; }
the maximum allowed number of semitones is 13 (InstrumentFunctions.h):

static const int MAX_CHORD_POLYPHONY = 13;

and if you don't put a boundary (-1 or -100 as I use it) the program logic doesn't stop and start over the sequence but awaits for all of the 13 steps to complete ( are those not assigned void?).
Up to now I was satisfied with the outcome of the little change I made so I didn't bother to go into the matter... could try

for( m_size = 0; m_size < sizeof(semi_tones); m_size++ )

or something similar; maybe next time I recompile.

I thought arpeggio does notes, not semitones. What is special about 100 notes?

nothing, it's not the number of notes, just an arbitrary choice for the boundary value in a number array

@tresf
Copy link
Member

tresf commented Oct 28, 2016

and if you don't put a boundary (-1 or -100 as I use it) the program logic doesn't stop and start over the sequence

I understand, but if you are going to treat -1 as a valid value, -100 is a bad delimiter. Whatever logic the library is using needs to be refactored. Magic numbers are generally bad, especially with iterators. INT_MAX would be slightly better but I'd strongly recommend finding a better way.

@Rikislav
Copy link

Rikislav commented Oct 29, 2016

Magic numbers are generally bad, especially with iterators

Thanks for reminding me! (I'm not a professional coder, my interventions on the source are as simple as they can be, serving the needs of the moment: didn't think for a second to integrate them into the official libraries, was just to share an idea).
Keep on the outstanding work, guys!!!

@zonkmachine
Copy link
Member Author

We need a new arpeggiator direction model. Random notes with Fisher - Yates shuffle. Random notes but each note is played only once while there are free notes left. Trying it out now and it works pretty well.
Also, the order of the direction models needs to be sorted.
... ~1.3

@zonkmachine zonkmachine removed this from the 1.3.0 milestone Oct 2, 2017
@zonkmachine
Copy link
Member Author

Lots of different random distributions here: https://en.cppreference.com/w/cpp/named_req/RandomNumberDistribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants