Csound Csound-dev Csound-tekno Search About

[Csnd] How do I do a frequency shift?

Date2009-10-16 12:52
Fromcsndnoob
Subject[Csnd] How do I do a frequency shift?
I've only been using the program a couple days so some of the stuff like the
pv stream stuff still baffles me. Anyway when I run this I get an invalid
pointer error:

*** glibc detected *** csound: free(): invalid pointer: 0x000000000225df70
***

What have I done wrong? Also is there somewhere I can find a more in depth
explanation of pv stream opcodes than the manual?

Cheers




;-odac -iadc -d
-o oscil.wav -W



sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

instr 1
iamp = p4
ifrq = cpspch(p5)
ifn = 2
ishft = 7

kamp1 = iamp
kenv1	madsr	.005,	.5,	0,	.5

asig1	oscil	kamp1,	ifrq,	ifn
fsig  pvsanal   asig1, 2048, 256, 2048, 1 
ftps  pvshift   fsig, ishft, 0         
atps  pvsynth   ftps                 

	out atps
endin



;;;;;;;;;;;;;;;;;;;;;;;;;;;;


f	1	0	4096	10	1
f	2	0	4096	10	1 .5 .33 .25 .20 .167 .143 .125 .111

i1	0	.5	5000	7.05
i1	1	.5	5000	7.05
;i1	2	.5	5000	8.05
;i1	3	.5	5000	8.05
;i1	2	.5	5000	5.05

e



Date2009-10-16 13:16
FromVictor Lazzarini
Subject[Csnd] Re: How do I do a frequency shift?
your CSD runs fine here on OSX. What OS do you use?

But there is very little effect, as your shift is quite small (7 Hz),
meaning each harmonic gets added 7Hz to it. If you do something
larger, say 100 you will hear the effect.

The crash seems something else and looks like a bug, but certainly
not on OSX.

Victor


On 16 Oct 2009, at 12:52, csndnoob wrote:

>
> I've only been using the program a couple days so some of the stuff  
> like the
> pv stream stuff still baffles me. Anyway when I run this I get an  
> invalid
> pointer error:
>
> *** glibc detected *** csound: free(): invalid pointer:  
> 0x000000000225df70
> ***
>
> What have I done wrong? Also is there somewhere I can find a more in  
> depth
> explanation of pv stream opcodes than the manual?
>
> Cheers
>
>
> 
> 
> ;-odac -iadc -d
> -o oscil.wav -W
> 
> 
>
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 1
>
> instr 1
> iamp = p4
> ifrq = cpspch(p5)
> ifn = 2
> ishft = 7
>
> kamp1 = iamp
> kenv1	madsr	.005,	.5,	0,	.5
>
> asig1	oscil	kamp1,	ifrq,	ifn
> fsig  pvsanal   asig1, 2048, 256, 2048, 1
> ftps  pvshift   fsig, ishft, 0
> atps  pvsynth   ftps
>
> 	out atps
> endin
>
>
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
>
> f	1	0	4096	10	1
> f	2	0	4096	10	1 .5 .33 .25 .20 .167 .143 .125 .111
>
> i1	0	.5	5000	7.05
> i1	1	.5	5000	7.05
> ;i1	2	.5	5000	8.05
> ;i1	3	.5	5000	8.05
> ;i1	2	.5	5000	5.05
>
> e
>
> 
> 
> -- 
> View this message in context: http://www.nabble.com/How-do-I-do-a-frequency-shift--tp25924124p25924124.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:20
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: How do I do a frequency shift?
Mea culpa.  It is wrong in the 64bit version but OK in floats (I think).

>
> I've only been using the program a couple days so some of the stuff like
> the
> pv stream stuff still baffles me. Anyway when I run this I get an invalid
> pointer error:
>
> *** glibc detected *** csound: free(): invalid pointer: 0x000000000225df70
> ***
>
> What have I done wrong? Also is there somewhere I can find a more in depth
> explanation of pv stream opcodes than the manual?

You are doing nothing wrong -- I am!

==John ff



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:27
FromVictor Lazzarini
Subject[Csnd] Re: Re: How do I do a frequency shift?
yes, I can confirm that. I get a crash in 64 bit csound. What should  
we do about it?

Victor
On 16 Oct 2009, at 13:20, jpff@cs.bath.ac.uk wrote:

> Mea culpa.  It is wrong in the 64bit version but OK in floats (I  
> think).
>
>>
>> I've only been using the program a couple days so some of the stuff  
>> like
>> the
>> pv stream stuff still baffles me. Anyway when I run this I get an  
>> invalid
>> pointer error:
>>
>> *** glibc detected *** csound: free(): invalid pointer:  
>> 0x000000000225df70
>> ***
>>
>> What have I done wrong? Also is there somewhere I can find a more  
>> in depth
>> explanation of pv stream opcodes than the manual?
>
> You are doing nothing wrong -- I am!
>
> ==John ff
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:32
FromPeiman Khosravi
Subject[Csnd] Re: Re: Re: How do I do a frequency shift?
On 16 Oct 2009, at 13:27, Victor Lazzarini wrote:

> yes, I can confirm that. I get a crash in 64 bit csound. What should  
> we do about it?
>
> Victor
> On 16 Oct 2009, at 13:20, jpff@cs.bath.ac.uk wrote:
>
>> Mea culpa.  It is wrong in the 64bit version but OK in floats (I  
>> think).
>>
>>>
>>> I've only been using the program a couple days so some of the  
>>> stuff like
>>> the
>>> pv stream stuff still baffles me. Anyway when I run this I get an  
>>> invalid
>>> pointer error:
>>>
>>> *** glibc detected *** csound: free(): invalid pointer:  
>>> 0x000000000225df70
>>> ***
>>>
>>> What have I done wrong? Also is there somewhere I can find a more  
>>> in depth
>>> explanation of pv stream opcodes than the manual?

I had an article sometime ago about this: http://www.csounds.com/journal/issue7/onTheDesignOfSpectralToolsInBlue.html

I have submitted another article (slightly more interesting I think!)  
for the next issue as well.

Also I have seen papers around about more technical stuff. Just google  
it.

Best
Peiman

>>
>> You are doing nothing wrong -- I am!
>>
>> ==John ff
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:32
Frombecks
Subject[Csnd] Re: Re: How do I do a frequency shift?
Attachmentscs.txt  
On Fri, Oct 16, 2009 at 2:16 PM, Victor Lazzarini
 wrote:
> The crash seems something else and looks like a bug, but certainly
> not on OSX.

i can confirm, ubuntu + csound 5.10
gdb log in attach

ciao

-- 
cb

Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:38
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: How do I do a frequency shift?
> yes, I can confirm that. I get a crash in 64 bit csound. What should
> we do about it?
>

Code is fixed in CVS

Also see message in developer list (the technical resons)

==John ff



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:40
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: How do I do a frequency shift?
It's only in 64bit, related to a floats - doubles mismatch.

Victor
On 16 Oct 2009, at 13:32, becks wrote:

> On Fri, Oct 16, 2009 at 2:16 PM, Victor Lazzarini
>  wrote:
>> The crash seems something else and looks like a bug, but certainly
>> not on OSX.
>
> i can confirm, ubuntu + csound 5.10
> gdb log in attach
>
> ciao
>
> --  
> cb
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:43
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: How do I do a frequency shift?
I suppose I need to modify my question: do we need to re-release
fixed 5.11 binaries? We could offer a plugin replacement, perhaps?

Victor

On 16 Oct 2009, at 13:38, jpff@cs.bath.ac.uk wrote:

>> yes, I can confirm that. I get a crash in 64 bit csound. What should
>> we do about it?
>>
>
> Code is fixed in CVS
>
> Also see message in developer list (the technical resons)
>
> ==John ff
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:52
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: How do I do a frequency shift?
> I suppose I need to modify my question: do we need to re-release
> fixed 5.11 binaries? We could offer a plugin replacement, perhaps?
>
> Victor
>

As it is a plugin it would be nice to place the fixed version either on SF
or on another website -- I can offer dream.cs.bath.ac.uk for example.

Mind you if we dio that we ought to be consistent and post libpitch.so as
well as that gives transegr, and is just a plugin

==John




Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-16 13:59
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
To simplify we could keep ourselves to bug fixes at the moment. If the
independent release of opcodes works, we could think of using it to
post new opcodes in between major releases.

Victor
On 16 Oct 2009, at 13:52, jpff@cs.bath.ac.uk wrote:

>> I suppose I need to modify my question: do we need to re-release
>> fixed 5.11 binaries? We could offer a plugin replacement, perhaps?
>>
>> Victor
>>
>
> As it is a plugin it would be nice to place the fixed version either  
> on SF
> or on another website -- I can offer dream.cs.bath.ac.uk for example.
>
> Mind you if we dio that we ought to be consistent and post  
> libpitch.so as
> well as that gives transegr, and is just a plugin
>
> ==John
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-17 02:06
Fromcsndnoob
Subject[Csnd] Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
Thanks for the replies. Is there any way I can fix it at the moment? I'm
using 64-bit ubuntu 8.10. 



Victor Lazzarini wrote:
> 
> To simplify we could keep ourselves to bug fixes at the moment. If the
> independent release of opcodes works, we could think of using it to
> post new opcodes in between major releases.
> 
> Victor
> On 16 Oct 2009, at 13:52, jpff@cs.bath.ac.uk wrote:
> 
>>> I suppose I need to modify my question: do we need to re-release
>>> fixed 5.11 binaries? We could offer a plugin replacement, perhaps?
>>>
>>> Victor
>>>
>>
>> As it is a plugin it would be nice to place the fixed version either  
>> on SF
>> or on another website -- I can offer dream.cs.bath.ac.uk for example.
>>
>> Mind you if we dio that we ought to be consistent and post  
>> libpitch.so as
>> well as that gives transegr, and is just a plugin
>>
>> ==John
>>
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
> 
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
> 
> 

Date2009-10-17 02:20
FromMike Moser-Booth
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
If you're just looking for frequency shifting and aren't married to using the pv opcodes for it, take a look at the hilbert opcode. It's manual page includes an example that shows how to do frequency shifting using it.

.mmb

csndnoob wrote:
Thanks for the replies. Is there any way I can fix it at the moment? I'm
using 64-bit ubuntu 8.10. 



Victor Lazzarini wrote:
  
To simplify we could keep ourselves to bug fixes at the moment. If the
independent release of opcodes works, we could think of using it to
post new opcodes in between major releases.

Victor
On 16 Oct 2009, at 13:52, jpff@cs.bath.ac.uk wrote:

    
I suppose I need to modify my question: do we need to re-release
fixed 5.11 binaries? We could offer a plugin replacement, perhaps?

Victor

        
As it is a plugin it would be nice to place the fixed version either  
on SF
or on another website -- I can offer dream.cs.bath.ac.uk for example.

Mind you if we dio that we ought to be consistent and post  
libpitch.so as
well as that gives transegr, and is just a plugin

==John




Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body  
"unsubscribe csound"
      

Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
csound"


    

  


Date2009-10-17 08:17
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
John said he might do a plugin replacement for download. I'll
also do one for OSX (next week).
----- Original Message ----- 
From: "csndnoob" 
To: 
Sent: Saturday, October 17, 2009 2:06 AM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: How do I do a frequency shift?


>
> Thanks for the replies. Is there any way I can fix it at the moment? I'm
> using 64-bit ubuntu 8.10.
>
>
>
> Victor Lazzarini wrote:
>>
>> To simplify we could keep ourselves to bug fixes at the moment. If the
>> independent release of opcodes works, we could think of using it to
>> post new opcodes in between major releases.
>>
>> Victor
>> On 16 Oct 2009, at 13:52, jpff@cs.bath.ac.uk wrote:
>>
>>>> I suppose I need to modify my question: do we need to re-release
>>>> fixed 5.11 binaries? We could offer a plugin replacement, perhaps?
>>>>
>>>> Victor
>>>>
>>>
>>> As it is a plugin it would be nice to place the fixed version either
>>> on SF
>>> or on another website -- I can offer dream.cs.bath.ac.uk for example.
>>>
>>> Mind you if we dio that we ought to be consistent and post
>>> libpitch.so as
>>> well as that gives transegr, and is just a plugin
>>>
>>> ==John
>>>
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/How-do-I-do-a-frequency-shift--tp25924124p25934415.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-17 10:09
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
> John said he might do a plugin replacement for download. I'll
> also do one for OSX (next week).
> ----- Original Message -----
>

Do you mean doubles on 64bit linux, or doubles on 32bit linux?  Jut
checking.  Will build both today.




Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-17 17:21
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
>
> Thanks for the replies. Is there any way I can fix it at the moment? I'm
> using 64-bit ubuntu 8.10.
>

If that means x86_64 cpu then you willfind a replacement for
libcs_pvs_ops.so in http://www.codemist.co.uk/jpff/64/libcs_pvs_ops.so

If you have an i586 then there is a replacemnet in
http://www.codemist.co.uk/jpff/32/libcs_pvs_ops.so

May move then somewhere faster sometme

==John ff



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-18 04:15
Fromcsndnoob
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
Thanks John much appreciated. Now that I have a choice between this and the
hilbert that Mike mentioned, which would be more efficient if I am just
frequency shifting or would they be pretty similar?

Date2009-10-18 04:58
Fromcsndnoob
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
I just tried rendering my file again with the new plugin and now I get this
error:

orch compiler:
24 lines read
	instr	1	
error:  no legal opcode, line 24:
ftps  pvshift   fsig, ishft, 0         
error:  input arg 'ftps' used before defined, line 25:
atps  pvsynth   ftps                 
2 syntax errors in orchestra.  compilation invalid

I copied the plugin to /usr/lib/csound/plugins64 where the original was so
was that correct?

Date2009-10-18 08:13
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
Looks like the plugin was not loaded. Can you copy here all of the messages 
in
your terminal?

Victor
----- Original Message ----- 
From: "csndnoob" 
To: 
Sent: Sunday, October 18, 2009 4:58 AM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?


>
> I just tried rendering my file again with the new plugin and now I get 
> this
> error:
>
> orch compiler:
> 24 lines read
> instr 1
> error:  no legal opcode, line 24:
> ftps  pvshift   fsig, ishft, 0
> error:  input arg 'ftps' used before defined, line 25:
> atps  pvsynth   ftps
> 2 syntax errors in orchestra.  compilation invalid
>
> I copied the plugin to /usr/lib/csound/plugins64 where the original was so
> was that correct?
> -- 
> View this message in context: 
> http://www.nabble.com/How-do-I-do-a-frequency-shift--tp25924124p25943875.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-18 11:56
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
>
> I just tried rendering my file again with the new plugin and now I get
> this
> error:
>
> orch compiler:
> 24 lines read
> 	instr	1
> error:  no legal opcode, line 24:
> ftps  pvshift   fsig, ishft, 0
> error:  input arg 'ftps' used before defined, line 25:
> atps  pvsynth   ftps
> 2 syntax errors in orchestra.  compilation invalid
>
> I copied the plugin to /usr/lib/csound/plugins64 where the original was so
> was that correct?
> --
>

Arh!  That probably means that the plugin I created was not compatible
with the 5.11 binary, or I made a mess.  Give me a little time to try to
recreate.
==John ff




Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-18 13:47
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
I have replaced the plugin -- hope this one works
==John ff



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2009-10-19 12:41
Fromcsndnoob
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
Thanks John, unfortunately still not working though. I forgot to mention I am
using and AMD Athlon. BTW it isn't urgent so don't hurry to fix it if it's
just for my benefit.
Cheers


virtual_keyboard real time MIDI plugin for Csound
PortMIDI real time MIDI plugin for Csound
WARNING: not loading 'libcs_pvs_ops.so' (incompatible with this version of
Csound)
PortAudio real-time audio module for Csound
0dBFS level = 32768.0
Csound version 5.08 (double samples) Jul 24 2008
libsndfile-1.0.17
UnifiedCSD:  DOWNLOADS/MUSIC/csound/test.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/filegoKmER.orc
scorename: /tmp/file0pEmqJ.sco
rtaudio: PortAudio module enabled ... using blocking interface
rtmidi: PortMIDI module enabled
orch compiler:
24 lines read
	instr	1	
error:  no legal opcode, line 24:
ftps  pvshift   fsig, ishft, 0         
error:  input arg 'ftps' used before defined, line 25:
atps  pvsynth   ftps                 
2 syntax errors in orchestra.  compilation invalid

Date2009-10-19 12:44
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?
>
> Thanks John, unfortunately still not working though. I forgot to mention I
> am
> using and AMD Athlon. BTW it isn't urgent so don't hurry to fix it if it's
> just for my benefit.
> Cheers
>

Csound version 5.08 (double samples) Jul 24 2008

I built it for 5.11 (double samples)

So, mild suggestion to upgrade and then use this revised plugin

==John ff





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"