Converting timestamped pitch tracking into audible sound.

Hi,

I’m trying to convert a timestamped pitch list into audible sounds, and I was wondering how I can do this with Audacity. I am new to Audacity and Nyquist, but willing to learn.

These are the details of the project.
The pitch tracking files I have are tab-separated txt files with 2 columns.
The first column contains the timestamps in seconds, and the second column contains the pitch/frequencies in Hz obtained from a monophonic wav file.

What I would like to do is:
(1) having Audacity read the txt file and create a sound wave the reproduces the pitch content in audible form. Basically converting the timed pitch list in an audible melody;
(2) converting this sound output into MIDI format.

Is there a way to do this with Audacity?


Thanks in advance for taking the time to read and answer this topic.

Cheers,
Antonio

I’ve moved this topic to the Nyquist forum as it looks like a good project for Nyquist.

Do you have an example file that you could post?

This part could be tricky.
According to the documentation, the standalone version of Nyquist is able to read and write standard MIDI files, but that does not appear to be fully implemented in Audacity. When attempting to read or write MIDI files with Nyquist in Audacity, it crashes :frowning:
Nyquist in Audacity can read and write binary files, but it’s likely to be quite tricky.

Just logging this little snippet which will probably come in useful:

;; copy a binary file

(setf in-file "fully-qualified-path-to-input-file")
(setf out-file "fully-qualified-path-to-output-file")

(setf fp-in 
  (open-binary in-file :direction  :input))
(setf fp-out
  (open-binary out-file :direction  :output))
(setf confirm
(do ((byte (read-byte fp-in)(read-byte fp-in)))
    ((not byte) "Done")
  (write-byte byte fp-out)))

(close fp-in)
(close fp-out)
confirm

and a link to a page that describes the correct structure of a MIDI file: http://www.ccarh.org/courses/253/handout/smf/

Hi Steve,

thanks for your replies.

I’m attaching here an example of the type of files I’m working with.
Hope it’s useful.

Cheers,
Antonio.
Audacity Forum - Example file.txt (31.3 KB)

hi antomago,

Have you fixed this problem?

Hi jjf_1985,

no I haven’t, actually.

Do you have any suggestion?

Cheers,
Antonio.

Try this plug-in. It is called “Pitch List to Sound…”
Copy the file into the Audacity plug-ins folder and restart Audacity. The plug-in should then appear in the Generate menu.
Is this anything like what you want?

To get an idea of what it is doing, the PitchList2Sound.ny file can be opened in a plain text editor (I’d recommend NotePad++)

Nyquist Plug-ins Reference
Nyquist manual
PitchList2Sound.ny (524 Bytes)

i am sorry i have not fixed it too;

did you use the android app which named songify? i am study this effect, i think this effect is what we want.
and i find a .txt file in the app which is the same with your file: one list is time and the other is pitch.

1.0 50
1.5 47
2.0 47
2.5 45
3.0 54
3.75 52
4.5 50
6.0 50



I know the pitch scaling and pitch shift method, but how can i change the normal speech to the sound of singing use these methods?

Thanks Steve,

I’ll try the plugin, and let you know.

Cheers,
Antonio.

Thanks steve,
i will try this.