How do I do a frequency shift?

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

How do I do a frequency shift?

by csndnoob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


<CsoundSynthesizer>
<CsOptions>
;-odac -iadc -d
-o oscil.wav -W
</CsOptions>
<CsInstruments>

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


</CsInstruments>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
<CsScore>

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

</CsScore>
</CsoundSynthesizer>

Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>
>
> <CsoundSynthesizer>
> <CsOptions>
> ;-odac -iadc -d
> -o oscil.wav -W
> </CsOptions>
> <CsInstruments>
>
> 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
>
>
> </CsInstruments>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> <CsScore>
>
> 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
>
> </CsScore>
> </CsoundSynthesizer>
> --
> 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@... with body  
> "unsubscribe csound"



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

Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... with body "unsubscribe csound"

Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... 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@... with body  
> "unsubscribe csound"



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

Re: Re: Re: How do I do a frequency shift?

by peiman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@... 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@... with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body  
> "unsubscribe csound"



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

Re: Re: How do I do a frequency shift?

by becks-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 16, 2009 at 2:16 PM, Victor Lazzarini
<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@... with body "unsubscribe csound"
Program exited with code 0377.
Starting program: /usr/bin/csound -+msg_color=false -+rtaudio=JACK -o dac:system:playback_ -i adc:system:capture_ -+rtmidi=ALSA -M hw:3,0 -Q hw:3,0 -B4096 -b40 -m135 /home/becks/Desktop/2.csd
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb72abb20 (LWP 21379)]
[New Thread 0xb6566b90 (LWP 21380)]
[New Thread 0xb64e5b90 (LWP 21381)]
[New Thread 0xb410bb90 (LWP 21382)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb72abb20 (LWP 21379)]
0xb7735430 in __kernel_vsyscall ()
#0  0xb7735430 in __kernel_vsyscall ()
#1  0xb74e76d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb74e9098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb752524d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb752b604 in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb752d5b6 in free () from /lib/tls/i686/cmov/libc.so.6
#6  0xb763ed45 in mfree (csound=0x9ccc358, p=0x9d5bf08) at Engine/memalloc.c:144
#7  0xb762c21e in auxchfree (csound=0x13, ip=0x9d39990) at Engine/auxfd.c:111
#8  0xb763a601 in orcompact (csound=0x9ccc358) at Engine/insert.c:615
#9  0xb7642e22 in csoundCleanup (csound=0x9ccc358) at Engine/musmon.c:395
#10 0xb76b0a6e in csoundReset (csound=0x9ccc358) at Top/csound.c:2327
#11 0xb76b18d3 in csoundDestroy (csound=0x9ccc358) at Top/csound.c:1089
#12 0x08049664 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
#0  0xb7735430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb74e76d0 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb74e9098 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb752524d in ?? () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#4  0xb752b604 in ?? () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#5  0xb752d5b6 in free () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#6  0xb763ed45 in mfree (csound=0x9ccc358, p=0x9d5bf08) at Engine/memalloc.c:144
        pp = (memAllocBlock_t *) 0x5383
#7  0xb762c21e in auxchfree (csound=0x13, ip=0x9d39990) at Engine/auxfd.c:111
        auxp = (void *) 0x0
        nxt = (AUXCH *) 0x400
#8  0xb763a601 in orcompact (csound=0x9ccc358) at Engine/insert.c:615
        txtp = (INSTRTXT *) 0x9d10b60
        ip = (INSDS *) 0x9d39990
        nxtip = <value optimized out>
        prvip = (INSDS *) 0x0
        prvnxtloc = (INSDS **) 0x9d10bd8
        cnt = 1
#9  0xb7642e22 in csoundCleanup (csound=0x9ccc358) at Engine/musmon.c:395
        maxp = <value optimized out>
        rngp = <value optimized out>
        n = <value optimized out>
#10 0xb76b0a6e in csoundReset (csound=0x9ccc358) at Top/csound.c:2327
        saved_env = <value optimized out>
        p1 = <value optimized out>
#11 0xb76b18d3 in csoundDestroy (csound=0x9ccc358) at Top/csound.c:1089
        p = (csInstance_t *) 0x9ccc030
#12 0x08049664 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
quit

Re: Re: Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@... with body "unsubscribe csound"

Re: Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
> <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@... with body  
> "unsubscribe csound"<cs.txt>



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

Re: Re: Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... 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@... with body  
> "unsubscribe csound"



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

Re: Re: Re: Re: Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@... with body "unsubscribe csound"

Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... 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@... with body  
> "unsubscribe csound"



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

Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by csndnoob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by Mike Moser-Booth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... 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@... with body  
"unsubscribe csound"
      

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


    

  


Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John said he might do a plugin replacement for download. I'll
also do one for OSX (next week).
----- Original Message -----
From: "csndnoob" <jiffmailbox-csnd@...>
To: <csound@...>
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@... 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@... with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@... 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@... with body "unsubscribe
> csound"



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

Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@... with body "unsubscribe csound"

Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> 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@... with body "unsubscribe csound"

Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by csndnoob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by csndnoob :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like the plugin was not loaded. Can you copy here all of the messages
in
your terminal?

Victor
----- Original Message -----
From: "csndnoob" <jiffmailbox-csnd@...>
To: <csound@...>
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@... with body "unsubscribe
> csound"



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

Re: Re: Re: Re: Re: Re: Re: Re: How do I do a frequency shift?

by jpff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> 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@... with body "unsubscribe csound"
< Prev | 1 - 2 | Next >