• nicnut

    Hi @jameslo

    The two versions sound the same to me too. Thanks for the info, even though they sound the same it's good for me to learn how all this works. I also like when things get a little out of synch so threshold~ might be fine for me as well for most cases.

    posted in technical issues read more
  • nicnut

    Hi @jameslo

    Ok I tried out your method as I understand it. I am uploading a patch with the threshold~ method and the wrap~ method with the filter modulation so you can hear whats happening.

    When I use the phasor~ with an osc~ using wrap~ they all sound the same. Using cos~, as you did in your example, I can hear the different tempos, but it's a different waveform than an osc~.

    Is there a way to do use wrap~ with osc~ oscillators?


    FilterModWrap.pd wrap~.jpg

    posted in technical issues read more
  • nicnut

    Hi Everyone.
    Thank you again for all the suggestions.
    Using threshold~ and sending a zero into the right inlet is syncing everything up


    posted in technical issues read more
  • nicnut


    This seems pretty obvious, but I am sort of stumped.
    If I want to have several oscillators going at mathematically related speeds, how do I get them to line up their zero crossings?

    I have three osc~ objects. one at 10hz, one at 20hz and one at 40hz. I am doing some filter modulation and I want these three osc~ objects to be in sync.

    In the attached file if I do method 1 I can hear the slowest osc~ object affecting the amplitude of the other two faster ones.

    If I do method 2 the osc~ objects get out of sych.

    Let me know if someone knows how to do it.

    Thanks, Nick


    posted in technical issues read more
  • nicnut

    Hi @oid. After reading your most recent post I think I am starting to get it and I can see the advantages to how you are approaching this. It seems you are modularizing parts of the patch. That's why it would be easier for me to envision this in C++ because i can have a different block of code for different situations. And of course you can get as detailed as you want in each section.

    I am going to post what I have so far, even though it doesn't really work very well yet. In folder there is a patch called counterpointtest, and other necessary elements.

    For now I am trying out the expr object with two variables. f1 is an incoming scale step, and f2 is an interval between the last two notes.

    The patch should generate two notes. The one on the left would be a scale step a musician would input into the patch, and the one on the right would be generated based on some counterpoint rules that will be in the expr object (for now I only have a few to see how everything will work).

    The inputs Into the expr are intervals based on a 7 note scale, starting with 0. So 0 = unison, 1 = a 2nd, 2 = a 3rd, 3 = a 4th, 4 = a 5th and 7 = an Octave.

    In the f2 inlet of the expr should be the interval between the last 2 notes tested.
    What should happen is when a new note is played it’s state of change is tested against the last note played

    Ideally what would happen is I would play a note that would be f1, that note would be tested against the previous f1. For example, is the new f1 a scale step higher, or lower, etc. Whatever that difference in the past f1 to the current f1 would go into the expr object f1 inlet.

    In the other inlet of the expr object, f2 would be the last interval between the two notes, so a 5th, 4th, 3rd etc.

    A new interval should be generated by the expr object and added to the f1 scale step that was played. This new note will be played out of the right side of the patch., and the note selected to be played by the musician will be played on the left side of the patch, generating a two note interval (dyad).

    This patch doesn't work so well yet. One reason is that I need to put in every possible combination of intervals and scale steps into the expr. Maybe this is crazy as there are probably a hundred possible ways 2 notes can interact. And on top of that I want some interval combinations to have several possible weighted outcomes. Maybe this is too much work, but If I could do it it might be cool to use.

    Anyway, if anyone has time to take a look and let me know if I am approaching this in a way that might work and be practical.

    thank you. Nick


    posted in technical issues read more
  • nicnut


    thank you everyone for all these suggestions. Thank you @lacuna for the clarification on the [expr] object.

    I think I am going to try and pursue using the [expr] object with if statements. This is because, once I get a handle on 2 voice counterpoint I want to expand it to 3 voice and maybe even 4 voice.

    So I might do something like this to incorporate 2 intervals:
    [expr if($f1==1 && $f2==1, 1, if($f1==2 && $f2==2, 2, 0 ))]

    Otherwise, the select object would be easier to use.
    Thank you @oid for your code examples. I need to really examine what you have there. At first glance I am having a hard time understanding you patches.

    @seb-harmonik.ar I have been using Markov Chain methods for awhile and i really love doing that, but thats not what I am looking for here. I see Markov Chains as a way to imitate something, where what I want to do is have hard coded rules as to what the out comes will be. There will be some weighted probabilities, but everything will be predetermined.

    I will post some examples once I have something working. Thank you all.

    posted in technical issues read more
  • nicnut

    Ok now I have a more specific question

    How would I express an else if statement in the expr object? I don't see it in the help file.

    For example, if the incoming interval is 1 ( a 2nd) bang out of output 2,
    else if the incoming interval is 2 bang out of output 3,
    else if the incoming interval is 3 bang out of output 4, etc.

    thank you

    posted in technical issues read more
  • nicnut

    I have an idea for an object, and I was wondering if anyone might be able to suggest a way to realize my concept.

    I want to make an object that will take as it's input a midi note number. It will output another number that will be a musical interval. Then I input another note, and based on the previous resulting interval it will create a counterpoint melody based on rules and probability that I create.

    For example, if a previous interval was a perfect 5th, and the note I play (let's say the top note) goes up a step, I want there to be a high probability that the counterpoint note will go down a step and it will result in a 7th by contrary motion. If I have a 3rd there might be a high probability that the next interval will be a parallel 3rd. I have all the rules and probabilities kind of figured out in my head.

    But I don't really know the best way to approach this. I would think some kind of text based coding might be a way to go. Maybe I could do this in C++. But i can also use regular vanilla objects like select objects and, based on the interval, choose a different outcome.

    Eventually, based on if I can actually make this and it sounds decent, I would want to expand this into a 4 voice counterpoint generator.

    Anyway, any suggestions would be welcome.

    EDIT: ok I am looking at the expr if statements. I'll see if I can say if it's this interval, do this, else if it's this other interval do this, and try and list every interval. That seems to be a place to start.

    thank you

    posted in technical issues read more
  • nicnut

    I think makenote outputs a midi note number out of the leftmost outlet, and phasor~ needs a frequency value. So I suggest putting a mtof object between them.

    I don't know how you can get the velocity to a phasor, maybe it can be scaled to a volume control.

    For the duration, maybe send that to a delay object, and when the delay object is triggered it can send a 0 frequency into the phasor. I hope this helps

    posted in technical issues read more
  • nicnut

    Hi Balwyn. Wow this is exactly the type of sound I was envisioning. I am going to need to study your patch a little, but it sounds incredible.

    So, an audio file is fed into the patch, a soundfiler determines the length of the file in samples. Then a phasor randomly selects a sample to do playback from. And there is forward and reverse audio output.

    I adjusted it a little and added a metro with a randomized tempo to generate the random numbers, so the rhythm wouldn't be so even.

    But this is really amazing and exactly what I was trying to figure out.

    Thank you. Nick

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!