Csound Csound-dev Csound-tekno Search About

variable rate table writing

Date2017-05-13 18:02
FromKelly Hirai
Subjectvariable rate table writing
hey csound friends.

   i've been. trying to write a rate audio to tables at varing speeds.
i've been using tabw and phasor, but i'm noticing that when i write at
speeds < 1, the end of the previous block gets written over by the next
write. is there a way (or an opcode)  to scale the block of audio in
anticipation of the next write being somewhere in the middle of the
current. conversely, is there a table writing opcode that can stretch a
block of audio and write it across multiple blocks if i were to want to
write at speeds greater than 1?

k.

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

Date2017-05-13 18:23
FromOeyvind Brandtsegg
SubjectRe: variable rate table writing
Hi Kelly,
It sounds as if you need to make an intermediate buffer for the audio, then you can do those things easily.
The audio block of an a-rate signal "as is" will always be ksmps worth of audio samples, so it is hard to do read/write speed modifications directly with it. If you write it to an array or table, ksmps samples at each k-pass, then you have a buffer you can read from at any speed. You can for example iterate over all samples in a 10-second buffer all within one k-pass, or read them slowly one by one. If it is a continuous process, you could make the intermediate buffer circular, so that it will always contain the most recent N seconds of audio.

2017-05-13 10:02 GMT-07:00 Kelly Hirai <khirai@ongaku.isa-geek.net>:
hey csound friends.

   i've been. trying to write a rate audio to tables at varing speeds.
i've been using tabw and phasor, but i'm noticing that when i write at
speeds < 1, the end of the previous block gets written over by the next
write. is there a way (or an opcode)  to scale the block of audio in
anticipation of the next write being somewhere in the middle of the
current. conversely, is there a table writing opcode that can stretch a
block of audio and write it across multiple blocks if i were to want to
write at speeds greater than 1?

k.

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

Date2017-05-28 20:55
FromKelly Hirai
SubjectRe: variable rate table writing
so, i'm taking a shot at writing an opcode to scale a-blocks under the
direction of the /doc/csound_writing_opcodes.tex in the source tree. i
initially tried to clone the dam opcode and build it into the source
tree. when that failed, i tried to build a local .so file per the
instructions in the document. i've put the local build test case on github.

https://github.com/khirai/ablkscale/

the opcode code compiles fine. i can't seem to get csound to find my
opcode though. this has been the same issue whether i build in the tree
or out.

> make
csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
--Csound version 6.09 (double samples) May 28 2017
[commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
libsndfile-1.0.28
orchname:  phasor_debug.orc
Loading command-line libraries:
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
phasor_debug.orc (1)
 line 14:
>>>asigscale  ablkscale <<<
Unexpected untyped word asigscale when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure.



On 05/13/2017 01:02 PM, Kelly Hirai wrote:
> hey csound friends.
>
>    i've been. trying to write a rate audio to tables at varing speeds.
> i've been using tabw and phasor, but i'm noticing that when i write at
> speeds < 1, the end of the previous block gets written over by the next
> write. is there a way (or an opcode)  to scale the block of audio in
> anticipation of the next write being somewhere in the middle of the
> current. conversely, is there a table writing opcode that can stretch a
> block of audio and write it across multiple blocks if i were to want to
> write at speeds greater than 1?
>
> k.
>

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

Date2017-05-28 21:14
Fromjpff
SubjectRe: variable rate table writing
Are tee unresolved efeeces in you code?  Or missig interface functions?

Ty runig wit  -v ad/o under gdb ad break in load_module

Or show us your ode


On Sun, 28 May 2017, Kelly Hirai wrote:

> so, i'm taking a shot at writing an opcode to scale a-blocks under the
> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
> initially tried to clone the dam opcode and build it into the source
> tree. when that failed, i tried to build a local .so file per the
> instructions in the document. i've put the local build test case on github.
>
> https://github.com/khirai/ablkscale/
>
> the opcode code compiles fine. i can't seem to get csound to find my
> opcode though. this has been the same issue whether i build in the tree
> or out.
>
>> make
> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> --Csound version 6.09 (double samples) May 28 2017
> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
> libsndfile-1.0.28
> orchname:  phasor_debug.orc
> Loading command-line libraries:
> rtaudio: ALSA module enabled
> rtmidi: ALSA Raw MIDI module enabled
>
> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
> phasor_debug.orc (1)
> line 14:
>>>> asigscale  ablkscale <<<
> Unexpected untyped word asigscale when expecting a variable
> Parsing failed due to invalid input!
> Stopping on parser failure.
>
>
>
> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>> hey csound friends.
>>
>>    i've been. trying to write a rate audio to tables at varing speeds.
>> i've been using tabw and phasor, but i'm noticing that when i write at
>> speeds < 1, the end of the previous block gets written over by the next
>> write. is there a way (or an opcode)  to scale the block of audio in
>> anticipation of the next write being somewhere in the middle of the
>> current. conversely, is there a table writing opcode that can stretch a
>> block of audio and write it across multiple blocks if i were to want to
>> write at speeds greater than 1?
>>
>> k.
>>
>
> 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

Date2017-05-28 22:11
FromKelly Hirai
SubjectRe: variable rate table writing
code is here:
https://github.com/khirai/ablkscale/blob/master/ablkscale.c

#include "csdl.h"
#include "ablkscale.h"
#include 


static int ablkscaleinit(CSOUND *csound, ABLKSCALE *p)
{
    return OK;
}

/*
 * Run-time computation code
 */

static int ablkscale(CSOUND *csound, ABLKSCALE *p)
{
  MYFLT *ain = p->ain;
  MYFLT *aout = p->aout;
  MYFLT kscale = *(p->kscale);
  uint32_t osmpcnt,osmpposold,osmpposnew;  
  uint32_t offset = p->h.insdshead->ksmps_offset;
  uint32_t early  = p->h.insdshead->ksmps_no_end;
  uint32_t i, nsmps = CS_KSMPS;
  
  /* Process ksmps samples */
  if (UNLIKELY(offset)) memset(aout, '\0', offset*sizeof(MYFLT));
  if (UNLIKELY(early)) {
    nsmps -= early;
    memset(&aout[nsmps], '\0', early*sizeof(MYFLT));
  }
  osmpcnt=0;
  osmpposold=offset;
  for (i=offset;i Are tee unresolved efeeces in you code?  Or missig interface functions?
>
> Ty runig wit  -v ad/o under gdb ad break in load_module
>
> Or show us your ode
>
>
> On Sun, 28 May 2017, Kelly Hirai wrote:
>
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>> line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>    i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>>
>> 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

Date2017-05-28 22:12
FromEduardo Moguillansky
SubjectRe: variable rate table writing
To see if csound has found your opcode, do

csound -z

That will list all the opcodes. See if yours is there.


On 5/28/17 9:55 PM, Kelly Hirai wrote:
> so, i'm taking a shot at writing an opcode to scale a-blocks under the
> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
> initially tried to clone the dam opcode and build it into the source
> tree. when that failed, i tried to build a local .so file per the
> instructions in the document. i've put the local build test case on github.
>
> https://github.com/khirai/ablkscale/
>
> the opcode code compiles fine. i can't seem to get csound to find my
> opcode though. this has been the same issue whether i build in the tree
> or out.
>
>> make
> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> --Csound version 6.09 (double samples) May 28 2017
> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
> libsndfile-1.0.28
> orchname:  phasor_debug.orc
> Loading command-line libraries:
> rtaudio: ALSA module enabled
> rtmidi: ALSA Raw MIDI module enabled
>
> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
> phasor_debug.orc (1)
>   line 14:
>>>> asigscale  ablkscale <<<
> Unexpected untyped word asigscale when expecting a variable
> Parsing failed due to invalid input!
> Stopping on parser failure.
>
>
>
> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>> hey csound friends.
>>
>>     i've been. trying to write a rate audio to tables at varing speeds.
>> i've been using tabw and phasor, but i'm noticing that when i write at
>> speeds < 1, the end of the previous block gets written over by the next
>> write. is there a way (or an opcode)  to scale the block of audio in
>> anticipation of the next write being somewhere in the middle of the
>> current. conversely, is there a table writing opcode that can stretch a
>> block of audio and write it across multiple blocks if i were to want to
>> write at speeds greater than 1?
>>
>> k.
>>
> 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

Date2017-05-28 22:36
FromKelly Hirai
SubjectRe: variable rate table writing
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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

Date2017-05-29 00:19
FromSteven Yi
SubjectRe: variable rate table writing

I'm away from computer, but I think you're missing the LINKAGE macro that typically goes with localops.


On Sun, May 28, 2017, 4:36 PM Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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

Date2017-05-29 04:14
FromKelly Hirai
SubjectRe: variable rate table writing
i did not get that it was a macro. i thought that was a label in the text. progress.

thanks :)
k.

On 05/28/2017 07:19 PM, Steven Yi wrote:

I'm away from computer, but I think you're missing the LINKAGE macro that typically goes with localops.


On Sun, May 28, 2017, 4:36 PM Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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



Date2017-05-29 15:29
FromKelly Hirai
SubjectRe: variable rate table writing
no luck adding the LINKAGE macro. still gets the:

error: syntax error, unexpected T_IDENT  (token "ablkscale") from file phasor_debug.orc

i am also unable to pickup a breakpoint in gdb using:

b load_module (or _load_module or load-module)

nor am i able yet to see the opcode in the list produced by:

csound --opcode-lib=ablkscale.so -z

the thing is packed up on github. should be able to clone and make this test case on linux from here:

git clone https://github.com/khirai/ablkscale.git
cd ablkscale
make

i know devs are working on 6.09 release. don't let me drag your priorities. but if you get a moment to test this i would appreciate it.
k.


On 05/28/2017 11:14 PM, Kelly Hirai wrote:
i did not get that it was a macro. i thought that was a label in the text. progress.

thanks :)
k.

On 05/28/2017 07:19 PM, Steven Yi wrote:

I'm away from computer, but I think you're missing the LINKAGE macro that typically goes with localops.


On Sun, May 28, 2017, 4:36 PM Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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



Date2017-05-29 15:34
FromGuillermo Senna
SubjectRe: variable rate table writing
Just a quick thought: Did you "sudo ldconfig" after "sudo make install"?


On 29/05/17 11:29, Kelly Hirai wrote:
> no luck adding the LINKAGE macro. still gets the:
>
> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
> phasor_debug.orc
>
> i am also unable to pickup a breakpoint in gdb using:
>
> b load_module (or _load_module or load-module)
>
> nor am i able yet to see the opcode in the list produced by:
>
> csound --opcode-lib=ablkscale.so -z
>
> the thing is packed up on github. should be able to clone and make this
> test case on linux from here:
>
> git clone https://github.com/khirai/ablkscale.git
> cd ablkscale
> make
>
> i know devs are working on 6.09 release. don't let me drag your
> priorities. but if you get a moment to test this i would appreciate it.
> k.
>
>
> On 05/28/2017 11:14 PM, Kelly Hirai wrote:
>> i did not get that it was a macro. i thought that was a label in the
>> text. progress.
>>
>> thanks :)
>> k.
>>
>> On 05/28/2017 07:19 PM, Steven Yi wrote:
>>> I'm away from computer, but I think you're missing the LINKAGE macro
>>> that typically goes with localops.
>>>
>>>
>>> On Sun, May 28, 2017, 4:36 PM Kelly Hirai >> > wrote:
>>>
>>>     csound --opcode-lib=./ablkscale.so -z
>>>     -- not listed
>>>
>>>     k.
>>>
>>>     On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
>>>     > To see if csound has found your opcode, do
>>>     >
>>>     > csound -z
>>>     >
>>>     > That will list all the opcodes. See if yours is there.
>>>     >
>>>     >
>>>     > On 5/28/17 9:55 PM, Kelly Hirai wrote:
>>>     >> so, i'm taking a shot at writing an opcode to scale a-blocks
>>>     under the
>>>     >> direction of the /doc/csound_writing_opcodes.tex in the source
>>>     tree. i
>>>     >> initially tried to clone the dam opcode and build it into the
>>>     source
>>>     >> tree. when that failed, i tried to build a local .so file per the
>>>     >> instructions in the document. i've put the local build test
>>>     case on
>>>     >> github.
>>>     >>
>>>     >> https://github.com/khirai/ablkscale/
>>>     >>
>>>     >> the opcode code compiles fine. i can't seem to get csound to
>>>     find my
>>>     >> opcode though. this has been the same issue whether i build in
>>>     the tree
>>>     >> or out.
>>>     >>
>>>     >>> make
>>>     >> csound --opcode-lib=./ablkscale.so phasor_debug.orc
>>>     phasor_debug.sco
>>>     >> virtual_keyboard real time MIDI plugin for Csound
>>>     >> 0dBFS level = 32768.0
>>>     >> --Csound version 6.09 (double samples) May 28 2017
>>>     >> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>>>     >> libsndfile-1.0.28
>>>     >> orchname:  phasor_debug.orc
>>>     >> Loading command-line libraries:
>>>     >> rtaudio: ALSA module enabled
>>>     >> rtmidi: ALSA Raw MIDI module enabled
>>>     >>
>>>     >> error: syntax error, unexpected T_IDENT  (token "ablkscale")
>>>     from file
>>>     >> phasor_debug.orc (1)
>>>     >>   line 14:
>>>     >>>>> asigscale  ablkscale <<<
>>>     >> Unexpected untyped word asigscale when expecting a variable
>>>     >> Parsing failed due to invalid input!
>>>     >> Stopping on parser failure.
>>>     >>
>>>     >>
>>>     >>
>>>     >> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>>     >>> hey csound friends.
>>>     >>>
>>>     >>>     i've been. trying to write a rate audio to tables at
>>>     varing speeds.
>>>     >>> i've been using tabw and phasor, but i'm noticing that when i
>>>     write at
>>>     >>> speeds < 1, the end of the previous block gets written over
>>>     by the next
>>>     >>> write. is there a way (or an opcode)  to scale the block of
>>>     audio in
>>>     >>> anticipation of the next write being somewhere in the middle
>>>     of the
>>>     >>> current. conversely, is there a table writing opcode that can
>>>     stretch a
>>>     >>> block of audio and write it across multiple blocks if i were
>>>     to want to
>>>     >>> write at speeds greater than 1?
>>>     >>>
>>>     >>> k.
>>>     >>>
>>>     >> 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

Date2017-05-29 15:53
FromVictor Lazzarini
SubjectRe: variable rate table writing
Try giving the full path to the .so

like --opcode-lib=./myopcode.so

if it is in the working directory

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 29 May 2017, at 15:30, Kelly Hirai <khirai@ONGAKU.ISA-GEEK.NET> wrote:

no luck adding the LINKAGE macro. still gets the:

error: syntax error, unexpected T_IDENT  (token "ablkscale") from file phasor_debug.orc

i am also unable to pickup a breakpoint in gdb using:

b load_module (or _load_module or load-module)

nor am i able yet to see the opcode in the list produced by:

csound --opcode-lib=ablkscale.so -z

the thing is packed up on github. should be able to clone and make this test case on linux from here:

git clone https://github.com/khirai/ablkscale.git
cd ablkscale
make

i know devs are working on 6.09 release. don't let me drag your priorities. but if you get a moment to test this i would appreciate it.
k.


On 05/28/2017 11:14 PM, Kelly Hirai wrote:
i did not get that it was a macro. i thought that was a label in the text. progress.

thanks :)
k.

On 05/28/2017 07:19 PM, Steven Yi wrote:

I'm away from computer, but I think you're missing the LINKAGE macro that typically goes with localops.


On Sun, May 28, 2017, 4:36 PM Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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

Date2017-05-29 15:58
FromKelly Hirai
SubjectRe: variable rate table writing
full path or the win!
thanks everyone!
kelly

On 05/29/2017 10:53 AM, Victor Lazzarini wrote:
Try giving the full path to the .so

like --opcode-lib=./myopcode.so

if it is in the working directory

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 29 May 2017, at 15:30, Kelly Hirai <khirai@ONGAKU.ISA-GEEK.NET> wrote:

no luck adding the LINKAGE macro. still gets the:

error: syntax error, unexpected T_IDENT  (token "ablkscale") from file phasor_debug.orc

i am also unable to pickup a breakpoint in gdb using:

b load_module (or _load_module or load-module)

nor am i able yet to see the opcode in the list produced by:

csound --opcode-lib=ablkscale.so -z

the thing is packed up on github. should be able to clone and make this test case on linux from here:

git clone https://github.com/khirai/ablkscale.git
cd ablkscale
make

i know devs are working on 6.09 release. don't let me drag your priorities. but if you get a moment to test this i would appreciate it.
k.


On 05/28/2017 11:14 PM, Kelly Hirai wrote:
i did not get that it was a macro. i thought that was a label in the text. progress.

thanks :)
k.

On 05/28/2017 07:19 PM, Steven Yi wrote:

I'm away from computer, but I think you're missing the LINKAGE macro that typically goes with localops.


On Sun, May 28, 2017, 4:36 PM Kelly Hirai <khirai@ongaku.isa-geek.net> wrote:
csound --opcode-lib=./ablkscale.so -z
-- not listed

k.

On 05/28/2017 05:12 PM, Eduardo Moguillansky wrote:
> To see if csound has found your opcode, do
>
> csound -z
>
> That will list all the opcodes. See if yours is there.
>
>
> On 5/28/17 9:55 PM, Kelly Hirai wrote:
>> so, i'm taking a shot at writing an opcode to scale a-blocks under the
>> direction of the /doc/csound_writing_opcodes.tex in the source tree. i
>> initially tried to clone the dam opcode and build it into the source
>> tree. when that failed, i tried to build a local .so file per the
>> instructions in the document. i've put the local build test case on
>> github.
>>
>> https://github.com/khirai/ablkscale/
>>
>> the opcode code compiles fine. i can't seem to get csound to find my
>> opcode though. this has been the same issue whether i build in the tree
>> or out.
>>
>>> make
>> csound --opcode-lib=./ablkscale.so phasor_debug.orc phasor_debug.sco
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> --Csound version 6.09 (double samples) May 28 2017
>> [commit: 7827ba33f39a72ad57758685440b4d18c291a57d]
>> libsndfile-1.0.28
>> orchname:  phasor_debug.orc
>> Loading command-line libraries:
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>>
>> error: syntax error, unexpected T_IDENT  (token "ablkscale") from file
>> phasor_debug.orc (1)
>>   line 14:
>>>>> asigscale  ablkscale <<<
>> Unexpected untyped word asigscale when expecting a variable
>> Parsing failed due to invalid input!
>> Stopping on parser failure.
>>
>>
>>
>> On 05/13/2017 01:02 PM, Kelly Hirai wrote:
>>> hey csound friends.
>>>
>>>     i've been. trying to write a rate audio to tables at varing speeds.
>>> i've been using tabw and phasor, but i'm noticing that when i write at
>>> speeds < 1, the end of the previous block gets written over by the next
>>> write. is there a way (or an opcode)  to scale the block of audio in
>>> anticipation of the next write being somewhere in the middle of the
>>> current. conversely, is there a table writing opcode that can stretch a
>>> block of audio and write it across multiple blocks if i were to want to
>>> write at speeds greater than 1?
>>>
>>> k.
>>>
>> 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