Skip to content

Conversation

@elpescado
Copy link
Contributor

Overview

This feature allows to assign a probability value to each note. That value specifies probability that particular note will be played. Value 1.0 means that note will be played every time. Lowering that value will lower chances that note will be played, down to 0 which means that note will never be played.

This allows to create more complex and less predictable songs using less patterns.

screenshot
Audio demo: eight bars consisting of just one pattern.

Features

  • Probability panel editor
  • Player support
  • Audio export
  • Midi export
  • Song loading/saving
  • Undo/redo

Regressions

This branch should be backwards compatible. When note has no probability set, default value of 1.0 is used, which means note will always be played, preserving expected behavior.

@trebmuh
Copy link
Member

trebmuh commented Feb 28, 2016

Sounds promising as well !

@blablack
Copy link
Contributor

That's a really cool functionality!

@trebmuh
Copy link
Member

trebmuh commented Feb 28, 2016

Same here than in #356 (comment) @elpescado

I've been trying to build hydrogen from a fresh git clone ( 956fd11 ) with the addition of your patch : https://patch-diff.githubusercontent.com/raw/hydrogen-music/hydrogen/pull/358.patch
but it fails building.
What would be your suggestion?

@elpescado
Copy link
Contributor Author

What errors are you getting?

One thing I can think of is that this branch requires C++11 support from compiler. I created pull request which enables it, but it hasn't been merged yet: #263

@Nat-Napoletano
Copy link

I may be a little late to the game, but wouldn't this feature be better if it were coupled with a more general random variance in MIDI note velocity. This would be a more natural simulation of a human player who may deliver some "ghost" notes and undershoot the velocity or miss the drum making some hits inaudible. So I'm advocating for random velocity within a programmable range and a probability value to each note simulating a conscious decision to play a different pattern.

@elpescado
Copy link
Contributor Author

Any feedback?

@trebmuh
Copy link
Member

trebmuh commented Aug 9, 2016

Hi @elpescado : trying to build hydrogen from today (d7dacfe) + your patch: https://patch-diff.githubusercontent.com/raw/hydrogen-music/hydrogen/pull/358.patch

I've got the following when trying to apply the patch:

patching file src/core/include/hydrogen/basics/note.h
Hunk #1 FAILED at 192.
Hunk #2 succeeded at 305 (offset 9 lines).
Hunk #3 FAILED at 417.
2 out of 3 hunks FAILED
patching file src/core/src/basics/note.cpp
Hunk #1 succeeded at 62 (offset 1 line).
Hunk #2 succeeded at 109 (offset 8 lines).
patching file src/core/src/hydrogen.cpp
Hunk #1 succeeded at 485 (offset -2 lines).
patching file src/gui/src/PatternEditor/NotePropertiesRuler.cpp
Hunk #2 FAILED at 193.
1 out of 6 hunks FAILED
patching file src/gui/src/PatternEditor/NotePropertiesRuler.h
patching file src/gui/src/PatternEditor/PatternEditorPanel.cpp
patching file src/gui/src/PatternEditor/PatternEditorPanel.h
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 155.
2 out of 2 hunks FAILED
patching file src/core/src/basics/note.cpp
Hunk #1 succeeded at 222 (offset 14 lines).
Hunk #2 succeeded at 241 (offset 14 lines).
patching file src/tests/note_test.cpp
patching file data/xsd/drumkit_pattern.xsd
patching file src/core/src/basics/song.cpp
Hunk #1 succeeded at 1041 (offset -4 lines).
Hunk #2 succeeded at 1064 (offset -4 lines).
patching file src/core/src/local_file_mgr.cpp
Hunk #7 succeeded at 1449 (offset 30 lines).
patching file src/gui/src/PatternEditor/DrumPatternEditor.cpp
patching file src/gui/src/PatternEditor/DrumPatternEditor.h
patching file src/gui/src/PatternEditor/NotePropertiesRuler.cpp
Hunk #1 succeeded at 473 (offset -12 lines).
patching file src/gui/src/UndoActions.h
patching file src/core/src/smf/smf.cpp

Also, please note that github is saying in this thread that "This branch has conflicts that must be resolved".

I'd like to help testing this feature which looks definitely to be a great addition to Hydrogen from my POV.

Hope that helps

PS: I reckon that patching with #263 is not needed anymore since it's been merged to Master back in March.

@trebmuh trebmuh mentioned this pull request Aug 9, 2016
@elpescado
Copy link
Contributor Author

I have to merge latest master, unfortunately I'm bit busy right now. In the meantime, you could just checkout my branch directly.

@mauser
Copy link
Member

mauser commented Aug 10, 2016

@elpescado: At the moment i think that this (and your automation pull request) will be too much for 0.9.7, but both are very nice features! My plan is to get a beta3 out in the next days (along with the feature freeze for 0.9.7) and create the rc1 in two or three weeks. Both features would be the first things to merge in 0.9.8 for me (well, after testing 😄 ).

@trebmuh
Copy link
Member

trebmuh commented Aug 11, 2016

@elpescado: I've been building from your repo/branch, ie:

git clone https://github.com/elpescado/hydrogen.git
git checkout feature/probability-engine 

then build.

I've been fiddling around with this feature and I must say that I love it, really great addition to hydrogen!
While playing with it, I've seen nothing strange, it does look to play as expected.

Great job here!

PS: I would really like to see this feature incorporate into 0.9.7, but I don't know what the work involved doing that so I'll stick to @mauser 's decision. But mauser, if you think that this feature can be merged in master before 0.9.7, you would make (at least) one hydrogen's user really happy :)

@elpescado
Copy link
Contributor Author

I have updated my branch so that it should merge cleanly.

@IvanDSM
Copy link

IvanDSM commented Oct 25, 2016

Is it updated? This would be a great addition to 0.9.8!

@mauser mauser merged commit 64fecca into hydrogen-music:master Nov 9, 2016
@mauser
Copy link
Member

mauser commented Nov 9, 2016

Hi @elpescado ,

thanks a lot for the pull request! I've merged the request now, so it will appear in the next version of hydrogen (1.0).

@trebmuh
Copy link
Member

trebmuh commented Nov 14, 2016

Sweet !

@trebmuh
Copy link
Member

trebmuh commented Nov 17, 2016

I did rebuild git from b19ba20 2 days ago and have been playing around with this feature which works as expected. So far, I didn't notice anything strange. I really like this feature, thanks @elpescado !

Thanks!

@oddtime
Copy link
Contributor

oddtime commented Aug 17, 2019

Just tried it on 1.0.0 beta, great idea.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants