1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

+1 if value equals previous

Discussion in 'Building With Reaktor' started by playmodes, Oct 8, 2016.

  1. playmodes

    playmodes NI Product Owner

    Messages:
    118
    Hello everyone!
    I'm running into a little problem i can't figure out how to solve...

    I'm building some kind of arpeggiator. The source for the notes is a progression of numbers (60,61,62,63,64,65,66) which runs into a re-scaler that allows remapping to different tonal scales. As many scales are made out of 7 notes instead of 12, there's always some repeating notes when you feed the re-scaler with the 12 numbers progression... for example, when re-scaling to aeolian:
    C C# D D# E F F# G G# A A# B ------> C D D D# F F G G G# A# A# C2
    As you see, in the resulting progression there are some notes which repeat, and although that can be interesting in some situations, i want to be able to decide if it happens or not... the result i would like to have would be, when re-scaling to an Aeolian scale would be something like:
    C C# D D# E F F# G G# A A# B ------> C D D# F G G# A# C2 D2 D#2 F2 G2

    I'm trying to find a way to solve that by adding 1 to the source progression if the result after re-scaling the pitches is equal to the previous result.
    I tried many different things, but i run into event-loops and as i am using core-cells it is not an option....
    I suspect that other problems will arise even if i solve that particular issue, as the resulting progression grows faster than the original, and maybe i'm doing a wrong approach to the whole thing...

    I'm attaching an ensemble with a simple version of my actual instrument, just with the problematic part... you can see a red led in the panel when there is a repeating note....

    Does any of you find some similar problem?
    any clues on how could i make that happen?

    thank you very much family...
     

    Attached Files:

  2. colB

    colB NI Product Owner

    Messages:
    3,969
    If you store the length of the scales with them (or otherwise calculate the length), you can use modulo/divide to generate the correct scale position and the octave.
     
  3. playmodes

    playmodes NI Product Owner

    Messages:
    118
    Hello again!
    I'm sorry for my delay, i had to leave this problem because i was immersed in many other things at work, and it hasn't been until now that i could come back again to this.

    Thanks for your suggestion colB!
    but to be sincere, i don't even know how to start implementing your solution... I'm using a core-based scale remapping macro i collected from some ensemble i can't remeber at the moment (most probably spiral or akkord, so lazyfish must be credited here)... and I wouldn't know how to request the length of each scale, or what to do then with it with the suggested div/mod operations...

    I guess i could "manually" get to know the length of each scale, and the store that in a table. So for example, when requesting a pentatonic scale having the table say "5". That's fine.. but then, how do I transform my incoming 1-2-3-4-5-6-7-8-9-10-11-12 sequences into some other sequence which points exactly to the notes on that pentatonic scale, or to a scale with length 7?


    I'm afraid i'm a bit lost... i'm sorry... help!


    Santiago Vilanova
    www.playmodes.com
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    create a table with 7 values. for an ionian, the values could be 0, 2, 4, 5, 7, 9, 11, or the number of semitones from the root, basically.
    then take the incoming pitch, modulo by 7, use the mod output to read a value from the table, multiply the div output by 12. add div*12 to the output from the table.

    this is just off the top of my head so may not work perfectly. but should work for c major.

    cleaner methods exist that allow you to create a single table that works for all western modes by storing the essential whole whole half, whole whole whole half pattern that defines most of western music. a bit more work, but much cooler in the end. my ensemble amadeus has an example. probably "four chords" from the user library, as well.
     
    Last edited: Nov 25, 2016
  5. playmodes

    playmodes NI Product Owner

    Messages:
    118
    thanks for your help salamanderanagram!

    well, it looks like re-writing the scale tables would be a feasible option, but I would prefer to use the scale filter macros i already have... like the one in the ensemble i posted in my first message, or the one i'm posting now (this one has the scale filter taken from the gaugear ensemble). A lot of work for entering the scales have been done there, for which i'm infinitely grateful... so would like to keep using those...

    I think all those macros have tables with a length of 12.... so i'm trying to figure out how to modify the incoming pitch sequence to a one that points to the different notes of the scale so that no repetition of notes is heard.

    If i had to do this in max/msp (which i must say is much flexible for many things than reaktor), i would use uzi 12 and counter to read from the "scalefilter" coll everytime there is a new scale selection from the gui. Using zl to filter note repetitions, and writing this new list to another coll i think i could manage to achieve what i'm trying to do here... but unfortunately reaktor is not max, so i need to find a proper way to do it in reaktor...

    Maybe i'm fantasizing too much and there's no way to do so... but something tells me there must be a way... maybe colB had something in mind that i haven't understood...

    I couldn't find the Amadeus ensemble you reffer to... and the FourChords ensemble is a cool one; in some way it was an inspiration for my last Cords ensemble (https://www.native-instruments.com/es/reaktor-community/reaktor-user-library/entry/show/10623/) which also integrates this kind of scale filtering, as well as MotionClusters (https://www.native-instruments.com/es/reaktor-community/reaktor-user-library/entry/show/10115/).
    The ensemble i'm developing right now follows this same line of MIDI generators.... and i would be happy to be able to create an instrument which is generates this arpeggios of scales with no repetition of notes.

    If there's no other solution i will re-write the scales table. But i would really preffer to find a more general solution which allows me to work with whatever scale filter i could find in the UL... makes it more flexible and re-usable in the long term....

    thanks for your help!
    :)
     

    Attached Files:

  6. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    sorry, but for me personally i find it much easier to build something from scratch than to figure out how somebody else was doing it.

    anyhow, here's a demo of amadeus. you can see i'm changing the scale from time to time in the lower left hand corner, but it's following the circle of 4ths/5ths, so the transitions are pretty smooth:



    basically it's a reaktorized version of some ipad app i saw a while back, i forget the name. as i never actually used the original app, i have no idea if the end result is actually that similar to the original.
     
    • Like Like x 2
  7. playmodes

    playmodes NI Product Owner

    Messages:
    118
    Wow!
    multi-header pianoroll... cool idea!
    I see... you can change the scale and a consecutive progression of notes is generated. That's it.

    Actually, what i'm trying it's not about figuring out how someone did something, neither about reverse engineering, but about how can i adapt to the particular way a given algorithm works, and extend what others have done. For this particular case, i want to find a specifical solution because there are many scale filtering macros in Reaktor with big scale databases (Spiral, Akkord, Gaugear, and many others in the UL) which work the same way... and even in some max msp abstractions the features are the same (ScaleMaster).

    I went some steps ahead tonite... using iterator i've been able to copy the data into a table every time there is a new scale selected. Then filtering repetitions using step filter and copying again in another table i have a progression which i can use to trigger the sequences without repetitions... i think... because right now it's still buggy and there's many hairstyling to do until this is usable... but i'm getting closer....

    i'm attaching the ensemble the way it is now, i guess it would clarify my actual approach

    i'm going to sleep,
    good night mates!

    s
     

    Attached Files:

  8. Michael O'Hagan

    Michael O'Hagan NI Product Owner

    Messages:
    1,163
    Where in the world do I get this at?

    it looks and sounds beautiful, excellent work my friend.
     
  9. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    thanks!

    it's kinda of a weird distribution method, unfortunately, but...
    you have to subscribe at reaktortutorials for a month. it's $9, you get access to this, another synth i made (unitron) and 20+ blocks.
    you just have to download them before your subscription ends.

    i was coming out with a couple of blocks a month, but i find the format to be pretty restrictive so i'm taking a break on that front. also i was finally accepted by propellerheads for the reason rack extension SDK so i'm not working in reaktor as much as i used to in my free time.
     
  10. playmodes

    playmodes NI Product Owner

    Messages:
    118
    Solved!
    I attach the last ensemble containing my final solution.

    Final approach is using iteration at every scale change to fastly write another table with the scale data. Filtering repeated notes using "step filter" module before writing the new table also allows having the length information. Incoming pitches, after being processed using modulo/div, request reading of this new table, generating an output which is quantized to the scale but has no repetition of notes.
    Side effect of this method is that pitch is increasing very fast because, for example, two pentatonic scales and a bit would be contained in a single 12 tone octave. This has to be corrected by substracting a quantity to the resulting pitch... otherwise very high pitches can be generated!

    Yes, I know is not a very idiosincratic approach... but it works for me, and allows me to go on creative development, which is the best part!

    :)

    Santiago Vilanova
    www.playmodes.com
     

    Attached Files:

  11. colB

    colB NI Product Owner

    Messages:
    3,969
    This is great :)