Csound Csound-dev Csound-tekno Search About

[Csnd] Resynthesis with strongest partials

Date2020-06-23 02:27
FromAlex Weiss
Subject[Csnd] Resynthesis with strongest partials
Hi list,

I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.

Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?

Thanks,
Alex
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-23 08:08
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Did you try pvstrace and regular phase vocoder analysis?

Prof. Victor Lazzarini
Maynooth University
Ireland

On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi list,

I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.

Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?

Thanks,
Alex
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-23 17:25
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:

I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.

Basically, what I'm looking for is pitch and amplitude tracking for all partials.

Thanks,
Alex

On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Did you try pvstrace and regular phase vocoder analysis?

Prof. Victor Lazzarini
Maynooth University
Ireland

On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi list,

I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.

Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?

Thanks,
Alex
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-23 18:35
From"Jeanette C."
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Hey hey Alex,
I tried something similar, with moderate success, using the PVS opcodes,
in particular pvsftw and pvsftr. It is part of my m_cubicon package, in
the CSD to create new waveforms:
http://juliencoder.de/sound/m_cubicon-0.5.zip
I used pitchtracking to get the fundamental and then wrote all bins to
an ftable. In that ftable I made informed guesses of the next partial
(harmonic partials), by going through a few bands and looking for the
greatest amplitude. Perhaps naive, but it worked well enough, though it
is costly on the CPU, I think. :)

If you - or someone else - can improve on that scheme, I'd be very
interested as well, since there are more fun applications for something
like that. :)

Best wishes,

Jeanette

Jun 23 2020, Alex Weiss has written:

> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might
> have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as
> it descends in pitch over the duration of the sound. What I'd love to do is
> trace the pitches and amplitudes of the strongest partials and experiment
> with changing their relative strengths. My understanding is that regular
> phase vocoder analysis won't work here as the center frequencies of the
> bins are fixed and the partials will move in and out of bins as they go
> down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all
> partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini 
> wrote:
>
>> Did you try pvstrace and regular phase vocoder analysis?
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>> On 23 Jun 2020, at 02:28, Alex Weiss  wrote:
>>
>> 
>> *Warning*
>>
>> This email originated from outside of Maynooth University's Mail System.
>> Do not reply, click links or open attachments unless you recognise the
>> sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only
>> the strongest n partials for resynthesis. It appears a combination of
>> pvsifd and partials will do the trick for the analysis, but I'm at a loss
>> with what to do with the resulting TRACKS data prior to resynthesis; I
>> can't find a resynthesis opcode that only uses the n strongest partials, so
>> presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track
>> individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> 
>> Send bugs reports to https://github.com/csound/csound/issues
>> 
>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Twitter: https://twitter.com/jeanette_c_s
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I used to think
I had the answers to everything
But now I know
... :) <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-06-23 20:48
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
There’s an opcode called part2txt which writes the partial tracks to a text file. 

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss  wrote:
> 
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
> 
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
> 
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
> 
> Thanks,
> Alex
> 
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini  wrote:
> Did you try pvstrace and regular phase vocoder analysis?
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 23 Jun 2020, at 02:28, Alex Weiss  wrote:
>> 
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>> 
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>> 
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>> 
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2020-06-23 20:49
FromVictor Lazzarini
SubjectRe: [Csnd] Resynthesis with strongest partials
Attachmentstrackplot.py  
Forgot the attachment

========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 20:48, Victor Lazzarini <Victor.Lazzarini@MU.IE> wrote:
>
> There’s an opcode called part2txt which writes the partial tracks to a text file.
>
> ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
> ftrk      partials ffr, fphs, 0.01, 1, 1, 500
> part2txt "partialsh.txt”,ftrk
>
> I am attaching a Python script that analyses a file and plots the tracks, maybe
> it might be useful.
>
>
>
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>>
>> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>>
>> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>>
>> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>>
>> Thanks,
>> Alex
>>
>> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>> Did you try pvstrace and regular phase vocoder analysis?
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>>
>>> 
>>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>> Hi list,
>>>
>>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>>
>>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>>
>>> Thanks,
>>> Alex
>>> Csound mailing list Csound@listserv.heanet.ie https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=sxT5di4c64Z3ruOJlO%2Ft3Qco0HS1hdgSR1MX1rEBcis%3D&amp;reserved=0 Send bugs reports to https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=BffXP5S0rM56BqWiKCXhxwp4DBHZqrLYVSZNZl1SzFw%3D&amp;reserved=0 Discussions of bugs and features can be posted here
>> Csound mailing list Csound@listserv.heanet.ie https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=sxT5di4c64Z3ruOJlO%2Ft3Qco0HS1hdgSR1MX1rEBcis%3D&amp;reserved=0 Send bugs reports to https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=BffXP5S0rM56BqWiKCXhxwp4DBHZqrLYVSZNZl1SzFw%3D&amp;reserved=0 Discussions of bugs and features can be posted here
>> Csound mailing list Csound@listserv.heanet.ie https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=sxT5di4c64Z3ruOJlO%2Ft3Qco0HS1hdgSR1MX1rEBcis%3D&amp;reserved=0 Send bugs reports to https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=BffXP5S0rM56BqWiKCXhxwp4DBHZqrLYVSZNZl1SzFw%3D&amp;reserved=0 Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=sxT5di4c64Z3ruOJlO%2Ft3Qco0HS1hdgSR1MX1rEBcis%3D&amp;reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C777ae4458da44a4e740e08d817ae7b76%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637285385449788256&amp;sdata=BffXP5S0rM56BqWiKCXhxwp4DBHZqrLYVSZNZl1SzFw%3D&amp;reserved=0
> Discussions of bugs and features can be posted here


Date2020-06-25 01:58
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-25 07:59
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-27 02:56
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Hey Jeanette,

Thanks for sharing. This is great, and very similar to what I was planning if the part2txt route doesn't work out. 

Alex

On Tue, Jun 23, 2020 at 10:35 AM Jeanette C. <julien@mail.upb.de> wrote:
Hey hey Alex,
I tried something similar, with moderate success, using the PVS opcodes,
in particular pvsftw and pvsftr. It is part of my m_cubicon package, in
the CSD to create new waveforms:
http://juliencoder.de/sound/m_cubicon-0.5.zip
I used pitchtracking to get the fundamental and then wrote all bins to
an ftable. In that ftable I made informed guesses of the next partial
(harmonic partials), by going through a few bands and looking for the
greatest amplitude. Perhaps naive, but it worked well enough, though it
is costly on the CPU, I think. :)

If you - or someone else - can improve on that scheme, I'd be very
interested as well, since there are more fun applications for something
like that. :)

Best wishes,

Jeanette

Jun 23 2020, Alex Weiss has written:

> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might
> have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as
> it descends in pitch over the duration of the sound. What I'd love to do is
> trace the pitches and amplitudes of the strongest partials and experiment
> with changing their relative strengths. My understanding is that regular
> phase vocoder analysis won't work here as the center frequencies of the
> bins are fixed and the partials will move in and out of bins as they go
> down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all
> partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie>
> wrote:
>
>> Did you try pvstrace and regular phase vocoder analysis?
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> *Warning*
>>
>> This email originated from outside of Maynooth University's Mail System.
>> Do not reply, click links or open attachments unless you recognise the
>> sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only
>> the strongest n partials for resynthesis. It appears a combination of
>> pvsifd and partials will do the trick for the analysis, but I'm at a loss
>> with what to do with the resulting TRACKS data prior to resynthesis; I
>> can't find a resynthesis opcode that only uses the n strongest partials, so
>> presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track
>> individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C180eb5fa9da04eeefa8708d81714b822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637284725050174065&sdata=HIyzbUJ9lm2jSue0QYfYHA2jWXDlCsOJ%2BVVDicOvW%2B8%3D&reserved=0>
>> Send bugs reports to https://github.com/csound/csound/issues
>> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=02%7C01%7CVictor.Lazzarini%40mu.ie%7C180eb5fa9da04eeefa8708d81714b822%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637284725050174065&sdata=%2BwfXT%2BfKxe2yxZ3y1ORAnKPtGxA0tAxxi0iml3sTeno%3D&reserved=0>
>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Twitter: https://twitter.com/jeanette_c_s
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I used to think
I had the answers to everything
But now I know
... :) <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-27 02:58
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-27 08:41
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-28 03:52
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-28 09:21
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-29 23:36
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-30 08:43
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-06-30 22:24
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-07-01 13:14
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Thx. Could you attach a fragment of the offending TXT? I think the duplicates may be dead tracks, in which case it may be expected. Since the tracks are matched upwards, the duplicates may be ignored.

The maxtracks issue appears to be a bug alright.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jun 2020, at 22:24, Alex Weiss <alexweiss86@gmail.com> wrote:


Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-07-01 18:52
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Attachmentspartials_repeated.txt  
Attached.

Alex

On Wed, Jul 1, 2020 at 5:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thx. Could you attach a fragment of the offending TXT? I think the duplicates may be dead tracks, in which case it may be expected. Since the tracks are matched upwards, the duplicates may be ignored.

The maxtracks issue appears to be a bug alright.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jun 2020, at 22:24, Alex Weiss <alexweiss86@gmail.com> wrote:


Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-07-08 02:30
FromAlex Weiss
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
Hi Victor,

Can you elaborate more on the fact that duplicates may be dead tracks? I was under the impression that dead/discarded tracks simply don't show up anymore for a time point. So for a given time point with duplicate track IDs, should I ignore the track ID completely or keep the first occurrence of it?

Thanks,
Alex

On Wed, Jul 1, 2020 at 5:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thx. Could you attach a fragment of the offending TXT? I think the duplicates may be dead tracks, in which case it may be expected. Since the tracks are matched upwards, the duplicates may be ignored.

The maxtracks issue appears to be a bug alright.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jun 2020, at 22:24, Alex Weiss <alexweiss86@gmail.com> wrote:


Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-07-08 08:25
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
It doesn't duplicate, but since they are in memory, it could be that they are just kept there. As I said, I am not sure, just a hunch. I have not had a time to look into this.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 Jul 2020, at 02:31, Alex Weiss <alexweiss86@gmail.com> wrote:


Hi Victor,

Can you elaborate more on the fact that duplicates may be dead tracks? I was under the impression that dead/discarded tracks simply don't show up anymore for a time point. So for a given time point with duplicate track IDs, should I ignore the track ID completely or keep the first occurrence of it?

Thanks,
Alex

On Wed, Jul 1, 2020 at 5:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thx. Could you attach a fragment of the offending TXT? I think the duplicates may be dead tracks, in which case it may be expected. Since the tracks are matched upwards, the duplicates may be ignored.

The maxtracks issue appears to be a bug alright.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jun 2020, at 22:24, Alex Weiss <alexweiss86@gmail.com> wrote:


Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2020-07-08 08:27
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Resynthesis with strongest partials
For the moment, just ignore the second ID.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 Jul 2020, at 02:31, Alex Weiss <alexweiss86@gmail.com> wrote:


Hi Victor,

Can you elaborate more on the fact that duplicates may be dead tracks? I was under the impression that dead/discarded tracks simply don't show up anymore for a time point. So for a given time point with duplicate track IDs, should I ignore the track ID completely or keep the first occurrence of it?

Thanks,
Alex

On Wed, Jul 1, 2020 at 5:14 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Thx. Could you attach a fragment of the offending TXT? I think the duplicates may be dead tracks, in which case it may be expected. Since the tracks are matched upwards, the duplicates may be ignored.

The maxtracks issue appears to be a bug alright.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jun 2020, at 22:24, Alex Weiss <alexweiss86@gmail.com> wrote:


Done. Let me know if you need more clarification on any of these.

Alex

On Tue, Jun 30, 2020 at 12:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Please file a bug, I'll look at it. It doesn't strike me as the right behaviour. 
Also note on the ticket that there is mo manual, so I don't forget

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Jun 2020, at 23:36, Alex Weiss <alexweiss86@gmail.com> wrote:


Great. I've fiddled around some more with the analysis parameters and am now getting the results I was looking for. The only thing that's still puzzling is that I sometimes get the same track (including the same ID) multiple times for a given time-point. Should I file a bug report or is this expected behavior?

On Sun, Jun 28, 2020 at 1:21 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, time point is every analysis point, spaced by a hopsize.

Max tracks is the absolute maximum, but the analysis is adaptive, the number of tracks varies with time as partials appear and disappear. The algorithm limits at that and does not admit more. I don't know why it is suddenly jumping when maxtracks is set low, could be a bug

The other parameter that defines how many tracks you end up with is the threshold. A higher threshold produces fewer tracks.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Jun 2020, at 03:52, Alex Weiss <alexweiss86@gmail.com> wrote:


Got it, thanks. I also had a few more questions about the partials opcode:

- Am I correct in assuming that a "time point" as referenced in your email and the manual is hopsize / sr?
- I am confused by the imaxtracks parameter. Is this the maximum number of tracks (i.e. partials) per time point? If so, I'd expect the file size of the .txt file to get smaller with successively smaller values of imaxtracks. But that seems to be only the case up until roughly 40 in my particular example -- values below that suddenly generate huge files (from about 150kb to over 450MB for this particular analysis).

Additionally, how does imaxtrack affect the analysis (other than generating fewer partials)? Does the algorithm simply stop after imaxnumber of tracks are reached for a time point, are only the strongest partials kept, or are more spectral peaks averaged for lower imaxnumber?

Alex

On Sat, Jun 27, 2020 at 12:41 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I can tell you now. It's line-oriented with each track on a different line, containing amp freq phase and track ID.

A set of tracks for a given time-point is terminated by a sequence of four -1s

Tracks are sequenced in time using their
IDs. So you start say, with ID 1 and follow
it all the way until it stops. IDs are unique.



Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Jun 2020, at 02:59, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks Victor, much appreciated. In the meantime, I'll take a look at the python script for clues on how to parse the .txt file.

Alex

On Wed, Jun 24, 2020 at 11:59 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I think it's not been documented but I will
fix that. There isn't a reverse opcode, I'm afraid.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 25 Jun 2020, at 01:58, Alex Weiss <alexweiss86@gmail.com> wrote:


Thanks, Victor. That worked great, although I can't find the opcode in the manual. Is there a similar txt2part opcode that reads in a (potentially modified) text file and converts it to a ftrk signal? And is the format used in the .txt file documented anywhere?

Alex

On Tue, Jun 23, 2020 at 12:48 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
There’s an opcode called part2txt which writes the partial tracks to a text file.

ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt”,ftrk

I am attaching a Python script that analyses a file and plots the tracks, maybe
it might be useful.



========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 23 Jun 2020, at 17:25, Alex Weiss <alexweiss86@GMAIL.COM> wrote:
>
> Thanks Victor, I wasn't aware of pvstrace. However, I'm realizing I might have to explain in more detail what I'm after:
>
> I have a short (and relatively simple) harmonic sound. It is not steady, as it descends in pitch over the duration of the sound. What I'd love to do is trace the pitches and amplitudes of the strongest partials and experiment with changing their relative strengths. My understanding is that regular phase vocoder analysis won't work here as the center frequencies of the bins are fixed and the partials will move in and out of bins as they go down in pitch over time.
>
> Basically, what I'm looking for is pitch and amplitude tracking for all partials.
>
> Thanks,
> Alex
>
> On Tue, Jun 23, 2020 at 12:08 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
> Did you try pvstrace and regular phase vocoder analysis?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 23 Jun 2020, at 02:28, Alex Weiss <alexweiss86@gmail.com> wrote:
>>
>> 
>> WARNINGThis email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>> Hi list,
>>
>> I'm trying to resynthesize a sound by tracking its partials and using only the strongest n partials for resynthesis. It appears a combination of pvsifd and partials will do the trick for the analysis, but I'm at a loss with what to do with the resulting TRACKS data prior to resynthesis; I can't find a resynthesis opcode that only uses the n strongest partials, so presumably I have to modify the TRACKS data beforehand.
>>
>> Is there an equivalent to pvsbin that allows me to look at each track individually and filter them as needed?
>>
>> Thanks,
>> Alex
>> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here