generating 500hz tone at 1000 hz sample rate doesn't work

  1. is a significant disbenefit.

Didn’t we previously use the Nyquist DTMF Generator then made a built-in effect?

So are those apart from 3) and 4) bugs or limitations in the built-in generator? What does 7) mean? Tone Generator doesn’t generate a 22050 Hz Sine tone at 44100 Hz sample rate.

We could fix those problems, e.g. allow Preview in built-in Generate effects?

There is no huge demand for new tones - most of the requests want Triangle added. I see no harm in shipping an advanced Tone Generator as well as the built-in one, if the Nyquist one has sufficient features. The custom oscillation looks interesting. I can’t see the need for the amplitude scale control. The “Square, no alias” could be removed from the built-in generator if we had a Nyquist generator too.

Any other cool features you could add that would (possibly) justify a separate Nyquist Generator? Some sort of control for extra/reduced overtones?

One guy recently requested generating antimatter tones: http://www.youtube.com/watch?v=tEZqTnlFe3Y. Should that be an effect, rather than part of the generation?


Gale

There’s no reason why Nyquist plug-ins can’t have time control widgets, other than that no-one has written that into the Audacity/Nyquist interface yet.
Roll-on “version 4” :wink:

I think you’re right, but with the current emphasis on maintaining a stable core application and moving other things into modules/plug-ins, that may not have been the best thing to do (in retrospect). The limitations in Nyquist plug-ins have little to do with Nyquist, but are (mostly) limitations of the under-developed interface between Nyquist and Audacity.

All 7 are “limitation” of the built-in generator (I’d not call them bugs).
Overcoming those limitations is (probably) possible, though with varying difficulty. Number 6 (Supports very low frequencies) would be very difficult (impossible?) to achieve with the current code.

All of those limitations are very easy to overcome in a Nyquist effect.

I’d say “there is little visible demand”.

There is also little “visible” demand for MIDI editing. About the only MIdI features we ever get asked for are recording and playback. That’s because people that know what MIDI is, also know that Audacity “does not do MIDI editing”. Similarly, people that know about sound synthesis “know” that Audacity is pretty rubbish at sound synthesis, which is a great shame because Audacity has Nyquist built in and Nyquist is awesomely powerful for sound synthesis.

Do you mean the choice of dB / linear?

I agree.

There’s a lot that “could” be added, but as always we are running into limitations of the current interface. That is the main thing that has deterred me from publishing generator/synthesizer plug-ins. An improved Audacity/Nyquist interface and access for Nyquist to MIDI tracks would be a game changer.

Cool sounding name :smiley:
What’s it mean???
It seems to be a kind of modulation effect where the modulation frequency is tied to the main generator frequency. I’m not sure that I could reproduce that exactly without knowing the algorithm (which would probably breach copyright), but that type of synthesis effect could easily be done as a generator.


It’s firmly on the agenda.

If the Nyquist Advanced Generator does more than generate a single tone (so that e.g. it could create simple sequences), I would see more point to it. Though a fully featured Nyquist sequencer would be good too.

And yes there is some demand for “sequencers”.

Yes, that control is called “Amplitude Scale” in the version I have.

So what was the problem with the built-in Generator in “7) Supports frequencies up to (and including) the Nyquist frequency”?


Gale

There are already people that use Audacity for editing instrument samples for use in samplers and sequencers. For example, there are a lot of references on the Internet to using Audacity as an external editor for Ableton Live.

https://forum.ableton.com/viewtopic.php?p=967170#p967170
http://ableton-live.tribe.net/thread/e6c8539d-a1fa-428c-818a-752eb9f2c7e8#b61c76ac-d743-4387-a1f0-adee17b1b4a2

In some cases the original audio sample will come from a recording (which may be done in Audacity)
Sometimes it may be copied from somewhere, which may be done with Audacity,
or it may be generated by a synthesizer, which could in the future also be Audacity.

Well it can, but as you can probably guess, the Audacity / Nyquist interface lets it down.

Here is a simple example plug-in.
Karplus-Strong.ny (1.48 KB)
The “music” is not particularly inspiring :wink: but it illustrates a couple of interesting features.

Firstly, the sound is an implementation of “Karplus-Strong string synthesis” (Karplus–Strong string synthesis - Wikipedia). It is a simple example of “physical modelling synthesis” (all the rage in the late '90’s) that produces plucked/struck string type sounds. This is just one of many types of synthesis that Nyquist can do (others include additive, subtractive, granular, FM, and virtually any other).

The other is that it is a simple monophonic sequencer (it can play “tunes”). A melody line, prepared in any text editor, can be pasted into the plug-in.
In this example, the melody is:

d3 g3 a3 b3 c4 d4 e4 d4 b3 c4 d4 e4 fs4 g4 a4 g4 e4 d4 e4 d4 b3 c4 b3 a3 g3 fs3 g3 a3 g3 fs3 d3 e3 fs3 g3 a3 b3 c4 d4 e4 d4 b3 c4 d4 e4 fs4 g4 fs4 g4 a4 b4 a4 g4 fs4 g4 fs4 e4 d4 cs4 d4 e4 fs4

(If you have a piano I expect that you can work out how to play that melody)

It would be much nicer if the melody could be read from a MIDI files, or better still, read from an Audacity MIDI track!

That’s not essential. It’s only there because I prefer to work in dB and the tradition in Audacity is for linear scale.
I presume that you would prefer linear scale.

Nice to get back to the original question
It’s as DVDdoug described (generating 500hz tone at 1000 hz sample rate doesn't work - #6 by DVDdoug).
The sine wave oscillator always starts at 0 degrees (the waveform rising from zero), as do the other oscillators except for “Square No Alias”.
Simple waveforms like these cross the zero line every 1/2 cycle.
If the frequency of the waveform is exactly the Nyquist frequency (half the sample rate), then the waveform will be crossing the zero line at each and every sample position. All of the samples will be exactly = 0.0 which is another way of saying “silence”.

In order to produce a non-silent waveform at the Nyquist frequency, the starting phase must be non-zero (as demonstrated by the code examples that I posted here: generating 500hz tone at 1000 hz sample rate doesn't work - #4 by steve

That being the case, we should make it easier for them by exporting to where the temp file comes from. :wink:

Yes I think it should be whichever waveform scale is default, which is currently linear.

You mean, except “Square”, I assume?

OK, then it was only the same question we started with.

So in the Tone Generator I did not find a phase control. Should there be such? I had to guess which type of waveform did not start at phase 0.


Gale

+1
I recall that this was discussed several years ago in relation to Ardour (DAW). If I recall correctly, one of the Ardour developers was involved in the conversation and very much in favour.

Despite this difficulty, Audacity is still quite popular as an “external editor” for DAW applications. By far the most common criticism of Audacity for this type of use is that Audacity does not make it easy to export the file back to where it came from.

Unfortunately there is a downside to making this easier, which is that it would encourage users to overwrite their “source” files, which (although much safer these days than previously), carries quite severe risks. I’m certainly not saying that we shouldn’t do it (I’m strongly in favour), just that we would need to give careful thought about how to mitigate the risks.


No problem.


Yes, whichever one it is :smiley:


The “HQ-Tone” generator has a “Phase” control.
If the user is bothered about aliasing, then they may well be bothered about phase.

The other “Tone Generator…” leaves out the phase control so as to save space in the interface.

Geek alert for the next section :ugeek:

For sine waves, there is a well established convention that “0 degrees phase” starts with the waveform rising from zero. This is obvious and undisputed (try “sin 0” on a calculator). For other waveforms, the position of “0 degrees” is less defined. More often than not, the zero phase point of a square wave is taken as the start of the positive part of the waveform.

A “pure” square wave is unrealizeable either in the analog or digital domains. It is a “theoretical concept” (like an infinitely small dot or infinitely thin line). Digitally, the maximum slope rises from -1 to +1 in one sample period, whereas in a “pure” (theoretical) square wave, the rise slope is infinite (vertical). This puts the 0 degrees phase point for a “pure” square at the start of the positive part of the waveform, and for a digital square wave, half way between that point and the last sample of the negative portion.

An alias free square wave can be defined in terms of the addition of multiple sine waves up to the Nyquist frequency, In this case, because all of the sine components are in phase, the phase of an alias free square wave is usually defined as the same as the sine wave components.

The starting point (0 degrees phase) for “sawtooth” and “inverse saw” waves is debatable. The two waveforms are expected to be the inverse of each other, so one of them must be “wrong”. By convention, the 0 degree phase point for a sawtooth waveform is usually taken as either: the point at which the waveform rises from zero, or the point at which the waveform rises from the most negative point.

For complex waveforms, the 0 degrees phase point becomes largely arbitrary because different sine components are likely to not be in phase with each other.