coding entire tracks
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
coding entire tracks
Windows 10
Audacity 2.1.0
Hello!
I'm wondering whether it is possible to 'code' an entire track (or multiple tacks), like "from timestamp 0 to timestamp 10 a chirp from 440 Hz to 880 Hz ... " with all additional information needed for a chirp (or other type).
I want to make an audiofile in which the frequencies at specific moments come from a (stochastic) formula (made in excel at the moment) with a chirp in between these points. I tried it manually, very labour intensive, and practically impossible to change as points are very much related. And trying out various sets of data is kind of the core what I want to do.
And example of what I wanted to 'smooth' out (it's now going from semitone to semitone): https://www.youtube.com/watch?v=m2x85LB0ZO8. Every white dot is a 'moment with parameters'.
And if it's possible: how do I do it?
Regards, Henriette
Audacity 2.1.0
Hello!
I'm wondering whether it is possible to 'code' an entire track (or multiple tacks), like "from timestamp 0 to timestamp 10 a chirp from 440 Hz to 880 Hz ... " with all additional information needed for a chirp (or other type).
I want to make an audiofile in which the frequencies at specific moments come from a (stochastic) formula (made in excel at the moment) with a chirp in between these points. I tried it manually, very labour intensive, and practically impossible to change as points are very much related. And trying out various sets of data is kind of the core what I want to do.
And example of what I wanted to 'smooth' out (it's now going from semitone to semitone): https://www.youtube.com/watch?v=m2x85LB0ZO8. Every white dot is a 'moment with parameters'.
And if it's possible: how do I do it?
Regards, Henriette
Re: coding entire tracks
You can do it using the built-in "Nyquist" scripting language (see: http://wiki.audacityteam.org/wiki/Nyqui ... _Reference)
For example, this code may be run in the Nyquist Prompt effect (see: http://manual.audacityteam.org/man/nyquist_prompt.html)
The "data" list contains a sequence of frequency and duration pairs, where frequency is in Hz and duration in seconds.
So in this specific case, a sine wave is produced that starts with a frequency of 1000 Hz, which then rises over a period of 1 second to 2000 Hz, then over the next 1/2 second the frequency falls to 500 Hz and stays at 500 Hz for 1 second.
Extrapolation between the data points is linear, as can be seen in the track spectrogram:
If you have further questions about programming Nyquist scripts, we have a forum board here: http://forum.audacityteam.org/viewforum.php?f=39
For example, this code may be run in the Nyquist Prompt effect (see: http://manual.audacityteam.org/man/nyquist_prompt.html)
The "data" list contains a sequence of frequency and duration pairs, where frequency is in Hz and duration in seconds.
Code: Select all
;type generate
(setf data (list 1000 1 2000 0.5 500 1 500))
(hzosc (pwlvr-list data))
Extrapolation between the data points is linear, as can be seen in the track spectrogram:
If you have further questions about programming Nyquist scripts, we have a forum board here: http://forum.audacityteam.org/viewforum.php?f=39
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: coding entire tracks
Feel free to tell us more about your project. It looks very interesting (to me anywaySledgeNL wrote:I want to make an audiofile in which the frequencies at specific moments come from a (stochastic) formula (made in excel at the moment) with a chirp in between these points. I tried it manually, very labour intensive, and practically impossible to change as points are very much related. And trying out various sets of data is kind of the core what I want to do.
And example of what I wanted to 'smooth' out (it's now going from semitone to semitone): https://www.youtube.com/watch?v=m2x85LB0ZO8. Every white dot is a 'moment with parameters'.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: coding entire tracks
Temporal blurring of any audio is possible with Audacity's "Paul Stretch" ...SledgeNL wrote:And example of what I wanted to 'smooth' out (it's now going from semitone to semitone): https://www.youtube.com/watch?v=m2x85LB0ZO8. Every white dot is a 'moment with parameters'.
But I think you maybe looking for glissando : where the frequency glides between notes.
The easiest way to do that is have your program to interpolate between the points.
Re: coding entire tracks
If I've interpreted your equations correctly, this gives the music for one Earth year, compressed into 36.5 seconds.
"basehz" is an arbitrary frequency offset.
"basehz" is an arbitrary frequency offset.
Code: Select all
;type generate
(setf r1 149.0)
(setf r2 108.0)
(setf t1 365.0)
(setf t2 (/ (* 8 365.0) 13.0))
(setf dur 36.5)
(setf basehz1 440)
(setf basehz2 440)
(setf xt (sum basehz1
(mult r1 (lfo (/ 10.0 t1) dur *sine-table* 90))
(mult r2 (lfo (/ 10.0 t1) dur *sine-table* 90))))
(setf yt (sum basehz2
(mult r1 (lfo (/ 10.0 t2) dur *sine-table* 0))
(mult r2 (lfo (/ 10.0 t2) dur *sine-table* 0))))
(mult 0.4 (sim (hzosc xt)(hzosc yt)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: coding entire tracks
Sweet! Thank you, Steve!
I have to take a good look at the second set of code, because the result sounds very different from what I had in mind - maybe because it's quite slow (and then the semitone restriction makes nice dissonants)
But the fact that I can program in Audacity opens a lot of possibilities - kind of a box of Pandora as there are just so many hours in a day.
My first project in audacity was this: https://www.youtube.com/watch?v=U4QsagMRgrE.
And there are more examples on that channel (some worse than others
).
Ultimately I would like to find a way to combine audio and video, where synchronicity is vital. Or maybe something with motion capture where the position of a hand leads to sound. All based on formulas/logic.
Xenakis would have loved this, I think
(have you read "Formalized Music", contains Fortran code (that I haven't deciphered yet))
I have to take a good look at the second set of code, because the result sounds very different from what I had in mind - maybe because it's quite slow (and then the semitone restriction makes nice dissonants)
But the fact that I can program in Audacity opens a lot of possibilities - kind of a box of Pandora as there are just so many hours in a day.
My first project in audacity was this: https://www.youtube.com/watch?v=U4QsagMRgrE.
And there are more examples on that channel (some worse than others
Ultimately I would like to find a way to combine audio and video, where synchronicity is vital. Or maybe something with motion capture where the position of a hand leads to sound. All based on formulas/logic.
Xenakis would have loved this, I think
Re: coding entire tracks
Just playing around with the idea, I quite liked this version:
(the duration 29.2 seconds is one complete cycle which can be looped)
or if you start with a stereo track (Tracks menu > Add new > Stereo track), you can make "stereo music":
(the duration 29.2 seconds is one complete cycle which can be looped)
Code: Select all
;type generate
(setf r1 149.0)
(setf r2 108.0)
(setf t1 365.0)
(setf t2 (/ (* 8 365.0) 13.0))
(setf dur 29.2)
(setf basehz1 440)
(setf basehz2 440)
(setf xt (sum basehz1
(mult r1 (lfo (/ 100.0 t2) dur *sine-table* 0))
(mult r2 (lfo (/ 100.0 t1) dur *sine-table* 90))))
(setf yt (sum basehz2
(mult r1 (lfo (/ 100.0 t1) dur *sine-table* 90))
(mult r2 (lfo (/ 100.0 t2) dur *sine-table* 0))))
(mult 0.4 (sim (hzosc xt)(hzosc yt)))
Code: Select all
;type generate
(setf r1 149.0)
(setf r2 108.0)
(setf t1 365.0)
(setf t2 (/ (* 8 365.0) 13.0))
(setf dur 29.2)
(setf basehz1 440)
(setf basehz2 440)
(setf xt (sum basehz1
(mult r1 (lfo (/ 100.0 t2) dur *sine-table* 0))
(mult r2 (lfo (/ 100.0 t1) dur *sine-table* 90))))
(setf yt (sum basehz2
(mult r1 (lfo (/ 100.0 t1) dur *sine-table* 90))
(mult r2 (lfo (/ 100.0 t2) dur *sine-table* 0))))
(mult 0.8 (vector (hzosc xt)(hzosc yt)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: coding entire tracks
Reminds me of PhotoSounder .... https://www.youtube.com/watch?v=W8MCAXhEsy4SledgeNL wrote:My first project in audacity was this: https://www.youtube.com/watch?v=U4QsagMRgrE
Re: coding entire tracks
PhotoSounder was one of the applications I've researched for my wish "to make pictures sound". Audiopaint was the only one that had a free version that you could actually do something with. On my YouTube channel I have a few videos that where done with it ('Star Wars' and 'La Tour Eiffel').Trebor wrote:Reminds me of PhotoSounder .... https://www.youtube.com/watch?v=W8MCAXhEsy4SledgeNL wrote:My first project in audacity was this: https://www.youtube.com/watch?v=U4QsagMRgrE
Now I want to go random through a picture, pick up information (color, position) and transform those to musical parameters. And those I might feed into Audacity. Once I get the hang of the Nyquist language
And the actual picture is kind of not in the picture anymore.... (although I want it back at some point)
Re: coding entire tracks
You can feed raw image-data into Audacity, but it's unlikely to sound musical ...SledgeNL wrote:Now I want to go random through a picture, pick up information (color, position) and transform those to musical parameters. And those I might feed into Audacity.
https://www.youtube.com/watch?v=cXjwJPz4qi0
You may be interested in the earslap projects ...
e.g. otomata ... https://www.youtube.com/watch?v=d2TPCmvxdTc