• 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

    counterpointtest.zip

    posted in technical issues read more
  • nicnut

    Hi,

    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

    Hi,
    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

    @Balwyn
    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
  • nicnut

    Hi,
    I want to play audio I have stored, I guess in an array, but I want the samples not to be played strictly left to right, but some samples shifted in time or order. And if possible, I'd like parts of the array to be read from right to left. When I say right or left I am referring to the timeline of the audio file, from beggining (left) to end (right).

    Does anyone have any suggestions as to how to approach this? What i am trying to achieve is a type of glitchy effect when playing an audio file. I also don't want to change the pitch of anything, just the order in which the samples are played.

    If anyone has some ideas please let me know. I feel like this is a real typical sound in Max or Pd, but I have never really been able to do it.

    thank you in advance for your suggestions.

    If I have an audio file entered into an array,

    posted in technical issues read more
  • nicnut

    hey, I saw this post and thought skipping a step is an interesting idea.

    Here's one version I came up with, but the skipped step is randomizedskipstep.jpg

    posted in technical issues read more
  • nicnut

    Hi,

    I haven't read the whole discussion, so I don't know if this was mentioned. I've worked a lot with RPi's and Pure data and here are my suggestions from experience.
    First, get a Rasperry Pi 4 with 16 gigs of RAM. Since I've been using that I've had no problems, no glitching at all. Also, get rid of all the toggle boxes and number boxes, and any other GUI objects. Use a counter instead of a toggle and use a float object instead of a number box, things like that. I think the gui objects slow down everything.

    I hope that helps.

    posted in technical issues read more
  • nicnut

    @FFW said:

    https://git.purrdata.net/jwilkes/purr-data/-/tree/emscripten/emscripten/project/purr-data

    Wow this is amazing. I need to learn the Purr Data objects a little better, but this is pretty amazing. Thank You!

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!