Replies: 12 comments 31 replies
-
The sum of probabilities of pattens in a group could be also < 1, that would represent the implicit presence of an empty pattern in the group |
Beta Was this translation helpful? Give feedback.
-
Hey @oddtime, I think this idea would quite naturally fit into the concepts of the virtual pattern Hydrogen does provided. In there a number of patterns can be combined and only the virtual one has to be selected in the song editor. Allowing for the patterns to have a probably when inside a virtual pattern seems legit. But what puzzles me is a convenient and intuitive way for adjusting the probability since there is the constraint that all probabilities (including the one of the empty pattern; which I would require to be added explicitly) have to add to 1. Also it would be nice to allow for this feature without introducing a new widget. By declaring a pattern to be virtual, it could expand vertically and display a list of the included patterns in the left part of the song editor. When toggling for allowing probabilities those could be displayed as horizontal bars next to the patterns and increasing/decreasing the probability of a single pattern would decrease/increase the value for all the others. |
Beta Was this translation helpful? Give feedback.
-
Excellent idea with the virtual patterns.
PS: the type 1. could be also "play only n patterns", with 1 <= n <= tot_patterns_in_virtual_pattern |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Allowing for this option can result in no pattern playing at all. If this event is very unlikely to happen due to values set e.g. to 0.99 for all patterns and it first occurs on stage, one would probably consider this a bug. I would only include the possibility of no pattern playing if this was explicitly added by the user.
True. But since the an action window make all other parts of Hydrogen unresponsive until it gets closed, it might make the overall UX less fluent. |
Beta Was this translation helpful? Give feedback.
-
Isn't it the case for note probability as well? In case no pattern is selected to be played (and "allow no pattern playing" is off), would you call |
Beta Was this translation helpful? Give feedback.
-
Sorry for the c++ question, patterns in virtual patterns are currently stored in a still a A new "datum" Thanks |
Beta Was this translation helpful? Give feedback.
-
I guess modifications to the array are probably infrequent and they're probably short, so there's no harm in the O(n) time complexity. The main concern really is expressiveness and legibility / maintainability of the code, and that's where the standard containers are really great. (though by the same token, the std algorithm library is handy for almost all the same things if you have an unordered array!) |
Beta Was this translation helpful? Give feedback.
-
This is an interesting thread I've enjoyed following. This is my first post on any Hydrogen discussions and I first need to admit that I haven't programmed in C++ in twenty-couple years, since I started using Java, so I'm not going to present much code at this point. Looking at the image above I thought of another way to implement this idea: Pattern 1 has a one in ten chance of being chosen, Patterns 2 and 4 both have a 2 in 10 chance and Pattern 3 has a 5 in 10 chance. using that total, create an array of 10 pattern pointers and fill it with the actual pointers in the correct ratios: pPatternArray = { p1,p2,p2,p4,p4,p3,p3,p3,p3} Next, use a random shuffling loop to mix them up. Iterate i from 0 to 9 and on each loop, use a random number (from 0 to 9) and swap the array member at i with the spot indicated by the random number. So you could end up with something like pPatternArray = { p4,p3,p2,p3,p4,p3,p1,p3,p2} When the non-deterministic random pattern is to be played, use a random number from 0-9 to pick which pattern to play. Another approach would be to do all the random determination when play is pushed, front filling the piece with the chosen pointers before the sound is started. This approach is pretty simple and has a pretty small memory footprint. |
Beta Was this translation helpful? Give feedback.
-
Did this feature ever mature? |
Beta Was this translation helpful? Give feedback.
-
@theGreatWhiteShark |
Beta Was this translation helpful? Give feedback.
-
The more time I spend fixing the virtual pattern stuff (it's implementation was only a stub), the more I want them to be used and to do useful things. I like the idea of putting probabilities in the virtual pattern dialog (and make the current virtual pattern an edge-case of the settings) to allow for non-deterministic patterns. How about we try to integrate this in the future 1.3. release? On the way we could also rename "virtual pattern" to something more intelligible, like "container pattern". |
Beta Was this translation helpful? Give feedback.
-
Hello everybody! I would like to share an idea on a possible feature: an additional way of defining non deterministic pattern sequences. Hope that the following example explains it enough.
Consider having a song with three patterns:
Think for example if you have a 'groove' pattern and many 'drums fill' patterns, then you may want 3 bars of groove followed by a fill, but without determining which one. Together with the already present note probability feature (which is absolutely fantastic!) this would make Hydrogen even more similar to a 'real' drummer.
At the moment the idea doesn't go beyond this scheme.
Since the implementation will require ideas and work for both core and gui, if you like it we could start to discuss on it.
Beta Was this translation helpful? Give feedback.
All reactions