Copy paste macro

Options
2»

Comments

  • colB
    colB Member Posts: 851 Guru
    Options

    Since it's Christmas, here's an example showing what I was trying to explain. It won't immediately do what you want, but it demonstrates the mechanisms I think.

    If you want to do this at audio rate, I would seriously recommend switching to core. The same approach will work, but better, and more efficiently. Not sure you can drive Primary event tables at audio rate without nasty hacks, and audio tables don't work the same way...

    The example has four mouse writable graphs, selectable with the buttons. You can select on, hit copy, then select a different one and hit paste. You can also save and recall snapshots.

    Here you can see what I mean by using a single table for all the graphs instances, a single input process that updates the active graph, and a single display that refreshed when you edit or switch graphs...

    Once you get to a particular level of complexity in terms of functionality, it makes sense to move to a more systematic approach like this... IMO

    It's not really that complicated, but does rely on some Primary Table instance Voodoo ;)

    I put plenty of notes in there, but if you have any questions about why things are the way they are, just ask

  • dumbrabbit
    dumbrabbit Member Posts: 22 Member
    edited December 2022
    Options

    Wow, thanks very much for that! That is also the method I had originally planned for my oscillators, just didn't understand how to use the event table and buttons properly. Will definitely study it and come back with questions!

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    That's an idea, I think he's using buttons to increment and decrement but not sure. The list might replace the buttons and the logic that produces the up down function. Hard to say without seeing the ensemble.

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    I kinda think I know what you're doing. The switch doesn't actually copy and paste anything. It only activates the circuit attached to its input. As an example, duplicate oscillator A but don't duplicate the panel buttons. This way the panel buttons can program oscillators A and B at the same time. Setting the switch to have 2 inputs will allow you to select between A OR B. That's how the switch works. Of course hooking it up like that with duplicated oscillators the result will be the same. But assume you modify the duplicate oscillator B. Now the panel buttons control both oscillators but in reality only one or the other works at the same time. The switch truly disconnects the circuitry so only A or B will be running. The switch comes in handy for reducing Cpu usage by choosing which circuit actually runs. The switch can also be used to direct the panel buttons to the individual oscillators. This is basically how the switch can be used. Haven't seen you ensemble so it's difficult know whether it can be of any use though. Like the list, it's just another tool as well as is the snap value module.

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    Here's an example of how to use the switch. The snap value isn't really necessary but I thought I'd show it since Colin brought the idea up. You may have some button logic that would go before the Snap Values and during a save the values would be recalled the next time by the snap values.

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    That's a good solution there. Not sure what he's really doing though. Got any idea why the switch is causing problems with this example. Sometimes B in works, sometimes not.


  • dumbrabbit
    dumbrabbit Member Posts: 22 Member
    edited December 2022
    Options

    After trial and error for many hours, I finally got what I needed.

    I worked on this test ensemble to figure out what I needed to do to be able to connect sine bank oscillators to it. Once it worked, I was able to copy and paste the ensemble into my synth I had been building and it sounds great.

    One problem I had to figure out was separating indexes per table and passing them to the correct Sine bank oscillator. Simple math in core was able to do that very easily. Take IDX values between 0-31 and pass them to Oscillator 1, between IDX values 32-64, pass them to Oscillator 2, and so on. And I can add as many oscillators as I need, it's just a matter of changing the sizes of the event tables.

    Oh, and the copy/paste macro works perfectly. I can build a sawtooth in one oscillator, copy and paste it into oscillator two(other oscillators) without having to draw each bar in the display, and they'll be matching sawtooths in the scope. All I have to do is simply change the pitch/fine knob I have to make it the correct pitch.


    Cheers, thanks for your help!

  • colB
    colB Member Posts: 851 Guru
    Options

    Got any idea why the switch is causing problems with this example

    The switch is not causing problems in this example. There are problems, but they are elsewhere.

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    At least you see it too. The bottom oscillator magically stops. It's so simple I thought reaktor might need to be reinstalled or something.

  • colB
    colB Member Posts: 851 Guru
    edited December 2022
    Options

    At least you see it too. The bottom oscillator magically stops. It's so simple I thought reaktor might need to be reinstalled or something.

    There is nothing wrong with Reaktor. Just a couple of unrelated errors in your code. I think you can find them easily.

    A good mindstate is to always assume that you made a mistake and keep searching! It is very rare that a problem is because of Reaktor. Almost always us. Ego can easily get in the way of resolving that ;)

    Its good to pay close attention to small details!

  • Studiowaves
    Studiowaves Member Posts: 472 Advisor
    Options

    Shi* Colin, I never did have an ego. I learned how stupid that was in the ninth grade. Our Psychology teacher explained the ego, alter ego, and the super ego. So no, I didn't give up on it and start blaming reactor. I actually didn't have my headphones on it was hectic around here. I made the mistake of not realizing it was a pitch input and not a frequency input. It think the oscillators are stopping and sticking on random values. It's probably related to both the sample rate and the wrapper causing it to stick. I remember wrapping the oscillation down an octave after a certain frequency a few years ago. Hammond organs like the B3 did that on each draw bar. If I remember it was termed foldback. Tones too deep would cross fade the deeper pitches into the octave above. They did the same with high tones except crossfade down an octave. You could go down 4 octaves and end up on the same pitch. They didn't want to put anything below 20hz or something into speakers. If they used filters the draw bar would fade out. I think they felt the foldfack somehow sounded more consistent. Here's the fixed version. It works exactly like it should. Good advise on the ego thing as it's really a cop out on getting to the bottom of things. I never could stand guys with big ego's. Talk later.


Back To Top