did I already reach the limits of my patching creativity?

    Dec 29 2013 | 4:32 pm
    I have made an oscillator out of chromatic samples using the polybuffer object. Each buffer inside the polybuffer has the recording of one tone. Everything is working well except for a very annoying "click" each time the buffer (=midinote) is changed which messes up everything. Is there a solution? Please help!

    • Dec 29 2013 | 7:20 pm
      Without looking at your patch, are you fading your samples in and out with a short [line~] or something similar?
    • Dec 29 2013 | 7:44 pm
      I can't use line~ in my patch, the oscillator has to be able to make a big glissando (glide) without any interruptions..
    • Dec 29 2013 | 9:13 pm
      Sorry I misread and thought you were using [poly~].
    • Dec 29 2013 | 9:22 pm
      I'm trying to do this with poly too, I guess this really is impossible with Max..
    • Dec 29 2013 | 9:46 pm
      Not impossible, just a bit of a pain. (But this is true in most DSP languages) If you have two different samples you need to read from both of them at the same time and cross fade.
    • Dec 29 2013 | 9:49 pm
      Limits of Max? Don't think so. Limits of your patching creativity? Perhaps ;)
    • Dec 29 2013 | 9:50 pm
      thank you for your comment. I already tried using crossfades instead, but if I make big fast jumps, the volume-sliders don't seem to be fast enough to follow. Do I need a super-computer for this? : )
    • Dec 29 2013 | 9:52 pm
      @loadmess: I already tried out so many patches. I'd gladly pay someone who thinks this is possible : ) remember I'm using over 100 recordings to make a single oscillator, a big jump requires easily 50+ crossfades in less than a second..
      seems like I also get more replies when using a more provoking title for my topics ; )
    • Dec 29 2013 | 10:10 pm
      In the absence of an alternative suggestion, I should shy from commenting but I think your frustration (I've read all the other threads) has resulted in an approach that seems flawed, rather than Max itself. It strikes me as very heavy-handed to use 100+ samples to get the sound of 1 oscillator. Someone else suggested using [wave~] and loading your sample into a buffer; surely this makes more sense? There are also numerous threads on here about waveshaping and (re-)creating unique oscillators.
      Sorry not be more constructive/helpful
    • Dec 29 2013 | 10:18 pm
      for example, from the toots:
      and Peter's own contributions to this thread:
      (I'm assuming this thread relates to an earlier question regarding a customised oscillator - if not, erm, oops sorry)
    • Dec 29 2013 | 10:22 pm
      or... emailing the people who designed the original softsynth oscillator?
      BTW, were we ever told what the samples came from to begin with?
    • Dec 29 2013 | 10:24 pm
    • Dec 29 2013 | 10:30 pm
      It's all in the implementation for crossfades. You need an equal power cross fade. There should be one in the M4L abstractions. (M4L.bal1~ ?) If there's a slider involved, that's probably not going to work well, since it needs to change at signal rate. (I.e. you should be able to control your oscillator with a signal)
      I'd also encourage you to use fewer samples, especially if these are from an oscillator. One sample per three half-steps is typical for samples of acoustic instruments, and I'd imagine you could probably get away with less.
      Inflammatory titles may get more notice, but when used too often they may get you ignored by the old-timers...
    • Dec 29 2013 | 11:29 pm
      thanks a lot guys, I will investigate the given options. I changed the title of the topic : )
    • Dec 30 2013 | 12:06 am
      P.S. So how much money we talking about?...
      Here's a version that uses stepped subdivisions per octave. (one chunk of buffer~ per octave) Uses a linear crossfade to go between the two oscillators.
      Can't upload the files directly, but here's TableSaw.js:
      function generate_harmonics(base_freq,sample_rate,start_sample,length) { fib_a = 1; fib_b = 1; fib_tmp = 1;
      fib_max = (0.5*sample_rate) / base_freq;
      for (i = 0.; i v = 0.; for (fib_a = 1, fib_b = 1; fib_a amp = 1/Math.pow(fib_a,0.75); v = v + amp * Math.sin(fib_a*2.*Math.PI*i/length); } outlet(0,i+start_sample,v*0.4); } }
      And here's TableSaw.maxpat:
    • Dec 30 2013 | 1:24 am
      Peter, did you made this patch for me? Thanks a lot! I'm very curious to see it in action ..but I'm afraid I'm doing something wrong.
      I copied your text (starting from "function generate..." till "outlet(0,i+start_sample,v*0.4);}}") into a text file which I renamed to TableSaw.js. In Max I get the following error:
      -tableSaw.js: Javascript SyntaxError: Illegal charachter, line 1
      I'm sorry/embarrassed I know so little about programming..it's probably something very simple. If your patch works we can certainly discuss a "reward" : )
      greetings from belgium, Nils
    • Dec 30 2013 | 3:15 am
      Hi Nils, I'll see if I can put it up on Dropbox/Yousendit/etc. later.
    • Dec 30 2013 | 9:01 am
      How about a link to that softsynth?
      Is it VST/AU? Why not use it in Max?
    • Dec 30 2013 | 11:12 am
      I can't use the softsynth because the oscillators are cut down to chromatic samples. It concerns vintage electronic instruments like the trautonium on which the ability of playing microtonal intervals in glissando like movements was one of the great benefits..
      Thanks Peter!
    • Dec 30 2013 | 11:45 am
      Ok, everything's working now. When I clicked the bang "generate fibonacci..." I got an error again, the .js file showed up in Max and seemed to contain completely different text. I pasted the text again in this window and now it works. I'm off for some testing.
    • Dec 30 2013 | 12:44 pm
      These crossfades are working wonderfully well. Very interesting patch. I tried to load 2 samples of my own to check if the timbral difference between them would be audible. But since their frequency is different (an octave) they don't go in unison. There is also quite a bit distortion. I assume the patch isn't ready for this.
      Would it be possible to modify it so I can load 7 samples (miditone 24, 36, 48, 60, 72, 84, 96) to have them crossfaded into an oscillator? This way I can check if 7 samples is enough for smooth transitions. It's possible I will need stepped subdivisions per tritone (or less..) for some of the more bright sounding oscillators. Concerning costs please send me an email: nils.vanderplancken@telenet.be
    • Dec 30 2013 | 5:55 pm
      It's very possible. You would need to use lookup tables to specify the boundaries rather than doing them via arithmetic, but it's very doable.
      You'll notice that I've specified as multiples of 100 Hz. This is because it will always be an integer subdivision if the sample rate (e.g. 441 samples). You'll get tuning errors with frequencies that don't map to integer subdivisions (say, 101 Hz). One solution is to use longer oscillator samples and divide the fundamental frequency. It's not perfect but it will be an improvement. Can contact you off list.
    • Dec 30 2013 | 6:15 pm
      Yes you can contact me.
      I have some further questions, but it might indeed be better to discuss them privately. I have to admit I will have to read your post a couple of times to fully understand, most of this stuff is new to me as I'm still learning Max.
      Again, if it is possible to hire you to make a fully working patch, I'm very interested. You seem to know what you're doing.
    • Jan 06 2014 | 2:00 pm
      Hi Peter,
      just to let you know I sent you some recordings,
      all the best,
    • Jan 13 2014 | 4:58 pm
      for those who were/are interested in this topic:
      2d.wave~ is the way to go to make an oscillator out of multiple samples.
      I speed-shifted all my recorded notes to the same frequency (same waveform length). After this I made sure that all my recordings are "loopable" and that they are all existing of exactly the same amount of samples. After this I pasted them all together in 1 bigger sound file.
      2d.wave slices this recording (loaded in a buffer) in as many parts as I have recorded notes and makes it possible to scroll both horizontally (=speed of the sliced parts = frequency) as vertically (crossfading between sliced parts) through the buffer.
      I made it work so that for each frequency the right sliced buffer part with it's own distinctive wave shape is chosen. Problem solved : )
    • Jan 13 2014 | 11:07 pm
      and that sounds like...? ;)