Extend Arpeggiators 32 slots?
-
Is it possible?
I have this project where the plugin/standalone play through different, user chosen, scale types. (I made this for my music students)I've created a library of scales from around the world, it's 236 different scales at the moment.
You chose the root note (playing it) and the plugin will show the scale on the keyboard and also written in text. It will also play the scale.I also have a small pattern library that can be applied to the scale and it will also be visually in text and on the keyboard, and of course you can hear it as well.
The user can make their own scales, writing them or playing tone by tone, and they will be saved with the plugin.
To my problem, when applying some patterns to some scales, the number of notes will be more than 32, which means the arpeggiator will not be able to play them all, so, is there a way to extend the numbers of slots in the arpeggiator module?
-
@ulrik Ok I managed to set the arpeggiator to have 64 slots.
I had to change 2 lines inside "Arpeggiator.cpp"
from 32 to 64, rebuild Hise and it worked.
I don't know if this is good way to do it so I kept the original "Arpeggiator.cpp" file.
Anyway, the project is working as intended, now I will compile it to au,vst and standalone to see if it works. -
@ulrik Yes the compiled versions is working, au, vst and standalone (Mac)
-
@ulrik great - perhaps point at these two lines so we can all do it?
-
-
@ustk said in Extend Arpeggiators 32 slots?:
@Lindon @ulrik Well done! Maybe @d-healey can make a pull request?
Maybe, does it force the arp to always use 64 slots or is it optional? If it's optional why stop at 64 :p
-
@d-healey Be careful! The "more" guy strikes again!
-
@Lindon yes of course :)
I changed 3 lines, 32 => 64
line 111numStepSlider->set("max", 32);
line 120
stepReset->set("max", 32);
line 414
int newNumber = jlimit<int>(1, 32, (int)value);
-
@d-healey It's optional, you can set whatever number in-between
-
Now available in my fork.
I made the max 128 :D
-
@d-healey Haha... that was a fast one :)
-
@d-healey Is your fork based on the "script node" version?
-
@d-healey -- I will await the imminent merge - and new version from Christoph..
-
My Fork is based on a scriptnode version from a few weeks ago (before Christoph got into his Snex rewrite) that builds successfully.
@Lindon The pull request was made 10 days ago, I don't expect it to be merged until Christoph is finished tinkering with Snex and whatever else he has planned for v3.
You can see a list of the changes I made here - https://github.com/christophhart/HISE/pull/156
-
@d-healey Great, thank you!
-
Great and interesting work @ulrik
Got 2 questions if you don't mind sharing info:-
You mentioned that "You chose the root note (playing it)" and I'm curious how to get the root note to be set based on a note played on the keyboard?
-
How do you get the arpeggiator to only play notes from a given scale?
If anyone else has insight your thoughts are always welcome.
Cheers & hope you're all good
-
-
the scales are in an array that will set the arpeggiators "Num Step" and "Note Numbers"
array.length = sets the value for Num Step
and each index value sets each Note Numbers value -
Ok thanks for the tips @ulrik... I'll try and work something out
Appreciate the response -
@ulrik so did you manage to set the root note by playing it on a keyboard, if so how?
Cheers
-
this is one of the scales:
const var Ionian = [ "Ionian", "C3", "D3", "E3", "F3", "G3", "A3", "B3", "C4" ];
then in the noteon callback I use
for(i=1; i<scale.length; i++) { tmp = Engine.getMidiNoteFromName(scale[i])+(Message.getNoteNumber())-60; // get midinote number from name Engine.setKeyColour(tmp, KeyColour); // Colour the keys notes.push(Engine.getMidiNoteName(tmp)); }
to push the scale in to a new array (notes), I'll start the for loop at index 1 cause index 0 contains the scale name.
So the "root" note will always be the key I play.Sorry if my explanation is not so good, but I hope you understand what I mean.
cheers /Ulrik