Transform a bipolar sinewave to unipolar signal


    May 08 2019 | 9:04 am
    Hello,
    I would like to know if is possible to get a unipolar signal where the negative signal of the sinewave converts to positive and if it possible how to do it.
    thank you.

    • May 08 2019 | 2:34 pm
      make yourself an abstraction patch containing [+~ 1.] [*~ 0.5] ?
    • May 08 2019 | 4:00 pm
      abs~
    • May 09 2019 | 8:53 am
      make yourself an abstraction patch containing [+~ 1.] [*~ 0.5] ?
      Done, thank you. But I would like to know why
      thank you
    • May 09 2019 | 12:06 pm
      Roman's suggestion does not do what I think you're describing, but it's very useful in other situations. A typical sinewave signal in Max varies between -1. and 1. Roman's suggestion first offsets this variation between 0. and 2. and then halves it, resulting in a 0. to 1. range (0.5 would be the center). Now, if you want to only alter the negative portion of the wave and turn it into positive, you could use the abs~ object.
    • May 10 2019 | 7:45 am
      Okey, got it. I can see the differences but I don't understand 100% why. And do you know how to convert a AC signal to DC signal -if is possible-?
    • May 10 2019 | 9:07 am
      What do You really want ? Convert Ac Signal into DC voltage ? Do You know what all that stuff means ?
    • May 10 2019 | 11:40 pm
      AC power signals in max? not before max 13.x
    • May 13 2019 | 6:41 am
      What do You really want ? Convert Ac Signal into DC voltage ? Do You know what all that stuff means ?
      The thing I want is to get a constant signal, a flat signal. Is because I trying to get, inside a LFO, a stepper sequencer. As I put in a different post i this forum:
      I was working with the LFO that comes with Ableton Live 10 and the max for live bundle and I thought that would be interesting to modify the random option to get a step sequencer lfo option. I've been trying to get that idea out for more than two weeks I am getting a little annoying....so the firs question is if this is possible and the second if it is, is how can I do it?
    • May 13 2019 | 7:00 am
      I am sorry, but it is still unclear what You want. I am not using Live and have no interest at it at all. Do You want to use output of LFO and convert it into what ? Or make step sequencer ? And what is the link between LFO and step sequencer ? Step sequencer has 3 values : 1 number of steps, 2 value of each step 3 current step where does that connect to LFO ? Step Sequencer sends values out replacing LFO's Output ? Or LFO output -1. - 1. scales into number of steps in Step Sequencer to run it.
      So if You want any help, talk plain text here, otherwise we just loose our time tying to find out what You really need.
    • May 14 2019 | 1:13 am
      #P window setfont "Sans Serif" 9.; #P window linecount 1; #P comment 427 466 189 9109513 what do you want it to look like?; #P user scope~ 423 329 553 459 64 3 16 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P comment 238 499 100 9109513 unipolar by scaling; #P comment 75 452 100 9109513 unipolar by folding; #P user scope~ 234 362 364 492 64 3 16 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P newex 267 289 69 9109513 +~ 0.5; #P newex 268 256 69 9109513 *~ 0.5; #P user scope~ 70 314 200 444 64 3 16 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P newex 180 270 69 9109513 abs~; #P toggle 45 53 15 0; #P newex 45 83 50 9109513 dac~; #P user scope~ 22 155 152 285 64 3 16 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0; #P newex 179 89 69 9109513 cycle~ 43.5; #P comment 25 290 100 9109513 bipolar; #P connect 1 0 2 0; #P connect 1 0 5 0; #P connect 1 0 7 0; #P connect 8 0 9 0; #P connect 7 0 8 0; #P connect 5 0 6 0; #P connect 4 0 3 0; #P window clipboard copycount 14;
    • May 15 2019 | 6:44 am
      Ok, First, sorry for not have been clear. It's difficult to me to explain myself in a right way.
    • May 15 2019 | 8:39 am
      You say "I tried to link the pitch of the stepper to the frecuency of the wave generator" That's an easy task - just scale expected note range to frequency range
      like scale 0 127 10. 100.
    • May 15 2019 | 5:30 pm
      That's one of the ideas I tried, but didn't work in the way I wanted...Doind that, I only got more or less velocity in the lfo, but not to get the steps in the lfo...did I explain well?
    • May 15 2019 | 9:22 pm
      there is absolutely no connection recognizable between that patch and all the different versions of your question. :)
      the first thing you have to do when you want find an algorithm to change some numbers to your liking is to find out in which range they sit. as soon as objects like [scale] or [!- 1.] are implemented in your brain, the rest of often easy.
    • May 16 2019 | 5:45 am
      I think that the problem is the foreign language and terminology... LFO does not have steps. It is oscilator. "Velocity" You mention is probably the speed = frequency of the "wave generator" which probably is cycle~ or saw~ or similar. If You want to create signal that reflects values of the step sequencer than scale the notes or velocity or whatever value to -1. 1. or 0. 1. or any other value You want. Send that to sig~. The output is hard switched signal value. -------- If You want to ramp (slide) between the values, try something else, like line~ or even number~ with set ramp time. -------
    • May 20 2019 | 7:29 am
      Yeah, thank you.