Jump to content


Photo
- - - - -

waveform generator


  • Please log in to reply
16 replies to this topic

#1 thanatos

thanatos

    Chief Above Chief Member

  • Normal Members
  • PipPipPipPipPipPip
  • 309 posts

Posted 09 September 2017 - 15:26

it would be great to have some kind of waveform generator with perfect tuning in the audio editor

 

what do you think of this idea ?


it would be great to have some kind of high level additive

like you generate a C4 and have 24 slider for each half tone


Satanical Bots Ritual : For your daily mix and news darkstep /breakcore / technno-dnb/ Crossbreed

 

My music 

My preview soundcloud


#2 OopsIFly

OopsIFly

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 895 posts
  • Gender:Male
  • Interests:...daydreams... -VS- ...propaganda...

Posted 09 September 2017 - 19:05

look for the following tools:

 

custom wave synth

padsynth

morphsynth

selection shaper

 

renoise itself needs no builtin tools, because it opens up a programming interface for people to create functionality, wave generation is one task.

 

or just sample a vsti, I do it all the time, creating waves, rendering selection to sample, extracting a wavecycle tuning it with some math & building a 100% renoise native synth instrument out of it.


  • thanatos likes this

#3 robohymn

robohymn

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Victoria, BC

Posted 10 September 2017 - 03:25

MOscillator (free) and MPowersynth have really good wave generators, you can also analyse a sample in different ways for its harmonic profile and they'll generate a wave with that profile, other cool stuff, just fyi.

Edited by robohymn, 10 September 2017 - 03:25.


#4 El°HYM

El°HYM

    Member

  • Normal Members
  • PipPip
  • 48 posts
  • Gender:Male
  • Location:NIBIRU
  • Interests:I AM El°HYM

Posted 12 September 2017 - 21:16

With the #tools available for Renoise, this should be no prob at all.

 

@robohym those Mthangs looking fine, too! tnx



#5 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6361 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 13 September 2017 - 19:55

it would be great to have some kind of waveform generator with perfect tuning in the audio editor

 

I guess that with "perfect" tuning, you are referring to equal temperament. 

And also, I guess that you are referring to the fact that it's generally tricky to work with single-cycle samples and achieve this? 

 

It's definitely true ... and comes down to the interplay between sample length, sample rate and/or tuning. 

For example, the default cycle in Renoise is 168 frames @ 44.1kHz. This is roughly a C-4 note, but still a few cents off: 

-- sample_rate/number_of_frames
44100/168 = 262.5 Hz

Compared to the MIDI standard (which specifies 261.62Hz), this frequency is off by 1.2 Hz - not a huge amount, but still noticeable when playing simultaneously with other, accurately tuned sounds . 

 

There are several things that can be done to make the tuning more accurate.

* increase the size of the sample/waveform or the sample rate (achieve a better fit / more resolution)

* apply fine-tuning to the sample 

 

I'll think about how this relates to the SSK (Selection Shaper) tool - perfect, or near-perfect tuning would definitely be nice to have there.


Tracking with Stuff. API wishlist | Soundcloud


#6 OopsIFly

OopsIFly

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 895 posts
  • Gender:Male
  • Interests:...daydreams... -VS- ...propaganda...

Posted 13 September 2017 - 20:33

I wrote lua functions to calculate a frequency from a note name (note name as in you give the function a string "d-4" or "f#3" and it will understand), and a note from a frequency. They are still in very raw state, and are to be used in some custom tool that I'm planning to do that will bundle a lot of calculations useful when working with digital music. But I already use them all the time, especially the note/freq conversions, I use them from the scripting terminal, but as I said I'm planning to make a musical calculations tool that will make usage more convenient for the average user. They will also display cent tunings when converting, thus can be used for tuning single cycle waveforms. Calculating a frequency from a number of samples is trivial if you know the sample rate. Maybe I can adjust the functions, so you could just mark a range in the sample editor, hit button or key combo and have it tuned in perfect manner instantly, I imagine this a very easy task, yet the time I have to spend with this topic is pretty rare, I say that just to not push up expectations.

 

I'd be willing to share the calculations for anyone who wants to do tools. They are rather trivial anyways. And I sometimes think there might be rounding errors or so, maybe someone else with a proper calculus/programming background could have a look at the math whether it is flawed or not. Using the results always got it reasonably well for me, though.

 

Am I right and the renoise cents as used in the sample properties are not 100 cent per half note, but rather 127? I fiddled around a bit, and it seems like 127 is spot on, while calculating with 100 cents will be off a little. I have made my function that will print note/cent so it will output base 100 cent and also base 127 cent. Heh, the functions will output the cents even with fractions, so you can see how much off the results will be from perfect. From my experience a 0.5 cent offset is rather slow phasing, so being unable to tune with fractional cents in renoise doesn't really matter for most use cases.


Edited by OopsIFly, 13 September 2017 - 20:35.


#7 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 14 September 2017 - 07:27

Being a no0b here and all...

 

Assuming that Renoise uses equal temperament (lol), and C-4 @ 168 frames is off by X cents. Doesn't it suffice to just offset all notes by X cents?

 

What can you gain by optimizing the length of individual pitches? Compared to global finetuning, I can just see that you get an ever so slightly more accurate data... just before garbling it with the usual interpolation.



#8 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2899 posts
  • Gender:Not Telling
  • Interests:Renoise sidechaining, macOS fanboying

Posted 14 September 2017 - 08:33

BTW. 44,1kHz is dead. 48kHz is the device's standard.

MacOS 10.12.6 Retina, Renoise 3.1 64 bit   -   Tuned Shortcuts | Multi-Jump From/To Send | Quick Template | Insert Native DSP Menu (incl. deprecated)


#9 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6361 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 14 September 2017 - 10:48

Assuming that Renoise uses equal temperament (lol)

 

Yes, people tell me it's a compromise  ;) 
 

What can you gain by optimizing the length of individual pitches? ... just before garbling it with the usual interpolation.

 

If a sample has accurate tuning, and is played back at it's original note ... then you don't need any interpolation at all.
Obviously, this would only be true for (multi-)sampled instrument where a sample has been generated for every note - but in the context of these tools, that's not far-fetched at all.


Tracking with Stuff. API wishlist | Soundcloud


#10 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 14 September 2017 - 10:55

If a sample has accurate tuning, and is played back at it's original note ... then you don't need any interpolation at all.
Obviously, this would only be true for (multi-)sampled instrument where a sample has been generated for every note - but in the context of these tools, that's not far-fetched at all.

 

Ehm..Are you really sure about this? It doesn't sound correct to me.

 

IMO, firstly, the sample will get interpolated differently depending on if you're in 44k1 or 48k (It's not like every chromatic pitch in perfect equal temperament will magically 'fit the matrix' of both 44k1 and 48k hz).

 

Or, maybe I'm missing some step in the signal chain when thinking about this...

 

PS. I really wanna sort this out since I'm making a modular sample generator with 'formula device', meta devices  et c. It's good to know what possibilities should be considered.


Edited by joule, 14 September 2017 - 10:59.


#11 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6361 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 14 September 2017 - 11:41

I'm a big fan of having good ingredients to cook with. So, I would certainly try to use samples that aligned with the project sample rate. Forgot to mention that.

 

But I'm not saying it can always be done, or even that it's always a good practice. Because...well, yes - the higher you set the bar the easier it tips over. It's definitely not easy to retain a 100% pure signal path, all the way from sample input to mixed output. 

For example, if you want to slap on a bit of vibrato or otherwise mess with the pitch, obviously there will be *some kind* of price to be paid. 


Tracking with Stuff. API wishlist | Soundcloud


#12 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 14 September 2017 - 12:05

Edit: I think I got it now.

Edited by joule, 14 September 2017 - 12:50.


#13 OopsIFly

OopsIFly

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 895 posts
  • Gender:Male
  • Interests:...daydreams... -VS- ...propaganda...

Posted 14 September 2017 - 14:21

@danoise can you you say something regarding the issue with the cents in the renoise sampler? So whether 127 or 100 are a full semitone? My research points toward 127, but not sure at all right now, or how to test such a small difference...

 

Edit: forget about it, one semitone is 127 finetuning steps in renoise, I was right with my assumption. Just when you're too tired to layer 2 sines tuned in a certain way to see how they behave.....

 

The importance of precise tuning can be seen for example with the ring mod in renoise. I just made a wavecycle 168 @ 44100. It was slightly out of tune with the ringmod, resulting in slow phasing. The I fired my lua calculations, and found out that it spat out something like this:

 

 

>>> print( freqtonote(44100.0/168.0) )
C-4 + 5.7766788345916c / + 7.3363821199313Rc

 

So it seemed like it was a good idea to do the inverse offset and tune the sample down by 7 cents. Tadaa - Rinmod phasing gone, or at least too slow to be noticed any more. The 0.33 cent is a detune much to small to be noticed by ear. The "c" number is base 100 cents, the "Rc" ("Renoise cents") calcs with cents being 127 for a semitone.

 

Well equal temperament is a compromise and will always generate slight phasing for anything else than same note or octaves. But, despite of this, tuning 2 different instruments perfectly to each other will keep their harmonic interaction and beatings between them at a very consistent niveau. I think you can hear the difference, though I have to say that wild detuning also has its place, even a more musical than perfect tuning, both have their reasons.

 

 

The cool thing about multisamples is you get rid of aliasing in high pitched notes. If you do the multisamples right, that is, so lowpass filtering above the audible range for the target pitch, is much more effective than the "aa" button renoise brings. Of course octave bends can sabotage this, but still the results will be superior.

 

Other than that when it comes to aliasing I always render my stuff @ 192k, and I learned to watch out with heavily distorted instruments to do a 192k test render while designing them, to see if the aliasing changes the sound too much. For example the renoise "saw_c1" is a Mistviech because of the silly gibbs ringing that is of no use but to create aliasing, but hitting the smooth button 3-4 times rolling the gibbs ringing off will fix that sample.


Edited by OopsIFly, 14 September 2017 - 15:30.


#14 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6361 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 14 September 2017 - 15:38

@danoise can you you say something regarding the issue with the cents in the renoise sampler? So whether 127 or 100 are a full semitone? My research points toward 127, but not sure at all right now, or how to test such a small difference...

 

Yes, it's 127 cents - same range as in the sample properties. 

Not sure *why* it has that range, probably tracker heritage? But yep, something to be aware of when doing calculations. 

 

Edit: about those bundled Renoise samples, they nicely demonstrate the principle of a longer buffer to better match the sample-rate:

 

2697 frames@44100Hz = C-1 

2936 frames@48000Hz = C-1

 

No fine-tune needed here, only bumping things up a few octaves   ^_^


Edited by danoise, 14 September 2017 - 16:03.

Tracking with Stuff. API wishlist | Soundcloud


#15 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 14 September 2017 - 18:00

I wouldn't dare using finetune for these operations, as I don't know exactly what happens internally in Renoise. How can we be sure that the output will really be sample perfect from the start to the end of the signal chain?

Isn't it better and simpler to just do the following:

1) Use the premise that A4 = 440hz and that the sample perfection should be achieved at 48khz.
2) Calculate the optimal cycle length (fundamental) for each key. The result will be a float number - example 167.2 frames or whatever.
3) Multiply the float number with X, so the result will be close to an integer. Maybe a tolerance of "0.05" can be acceptable.

Now we can generate a sample-perfect instrument (having multiple cycles to take the fractional frames into account)? I'd kind of think of these samples as being perfectly "pre-interpolated", by having them generated by oscillators in perfect alignment with the global sample rate.

#16 OopsIFly

OopsIFly

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 895 posts
  • Gender:Male
  • Interests:...daydreams... -VS- ...propaganda...

Posted 14 September 2017 - 18:29

My experiments have shown the renoise fine tune to be pretty reliable, other than the precision being discretized to 127 steps.

 

Nice idea with resampling to a sweet spot sample value to achieve more precision. Until fractional finetuning is implemented we have to live with a tuning tolerance of 0.5 *(100/127) cents for random tunings done to the next best step. Just to give some real numbers: It is not very much yet can be of effect sometimes - I just calced a c-4 note 261 something hertz, it will beat one cycle in about 16-17 seconds against the perfect tuning. So only problematic if you do real long droning pad synth stuff. This is worst case, most of the time you will have even slower beatings, and for each octave down the time should double up.

 

Of course you only need 1:1 precision when you layer oscillators and need them to be in sync 100%, for all other purposes the tolerance should be not deal. c'mon, every analog synth has far worse pitch stability. I'd say, if you really need perfect layering - just resample the oscs you wish to layer to the very same sample length, no detuning, no problem.



#17 thanatos

thanatos

    Chief Above Chief Member

  • Normal Members
  • PipPipPipPipPipPip
  • 309 posts

Posted Yesterday, 20:21

look for the following tools:

 

custom wave synth

padsynth

morphsynth

selection shaper

 

renoise itself needs no builtin tools, because it opens up a programming interface for people to create functionality, wave generation is one task.

 

or just sample a vsti, I do it all the time, creating waves, rendering selection to sample, extracting a wavecycle tuning it with some math & building a 100% renoise native synth instrument out of it.

thanks a lot this what i needed


Satanical Bots Ritual : For your daily mix and news darkstep /breakcore / technno-dnb/ Crossbreed

 

My music 

My preview soundcloud