[Csnd] detecting changes to an ftable?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] detecting changes to an ftable?

tgrey
I have a cabbage instrument that uses a few variables (roughly 12) to generate an ftable, overwriting it in place with ftgen on the fly as the controls are tweaked.

Is there a way for other instruments or UDOs to detect changes to the ftable, with a behavior similar to how changed() or changed2() detects changes to a variable?
Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

rorywalsh
Hi Kevin. I don't think there is an opcode for this, but it's possible I just missed it. You could probably write a UDO that reads through a table on each k cycle to look for changes?

On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
I have a cabbage instrument that uses a few variables (roughly 12) to generate an ftable, overwriting it in place with ftgen on the fly as the controls are tweaked.

Is there a way for other instruments or UDOs to detect changes to the ftable, with a behavior similar to how changed() or changed2() detects changes to a variable?
Csound mailing list [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

jpff
I do not think there is an opcode for this either.  Would be potentially expensive

⁣Sent from TypeApp ​

On May 27, 2018, 13:20, at 13:20, Rory Walsh <[hidden email]> wrote:

>Hi Kevin. I don't think there is an opcode for this, but it's possible
>I
>just missed it. You could probably write a UDO that reads through a
>table
>on each k cycle to look for changes?
>
>On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
>
>> I have a cabbage instrument that uses a few variables (roughly 12) to
>> generate an ftable, overwriting it in place with ftgen on the fly as
>the
>> controls are tweaked.
>>
>> Is there a way for other instruments or UDOs to detect changes to the
>> ftable, with a behavior similar to how changed() or changed2()
>detects
>> changes to a variable?
>> Csound mailing list [hidden email]
>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
>[hidden email]
>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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

rorywalsh
I was thinking the same, although I get the impression Kevin is using relatively small tables?

On 27 May 2018 at 13:24, John ff <[hidden email]> wrote:
I do not think there is an opcode for this either.  Would be potentially expensive

⁣Sent from TypeApp ​

On May 27, 2018, 13:20, at 13:20, Rory Walsh <[hidden email]> wrote:
>Hi Kevin. I don't think there is an opcode for this, but it's possible
>I
>just missed it. You could probably write a UDO that reads through a
>table
>on each k cycle to look for changes?
>
>On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
>
>> I have a cabbage instrument that uses a few variables (roughly 12) to
>> generate an ftable, overwriting it in place with ftgen on the fly as
>the
>> controls are tweaked.
>>
>> Is there a way for other instruments or UDOs to detect changes to the
>> ftable, with a behavior similar to how changed() or changed2()
>detects
>> changes to a variable?
>> Csound mailing list [hidden email]
>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
>[hidden email]
>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
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

thorin kerr
In reply to this post by rorywalsh
Another option: Write a UDO which both overwrites the table, and sets a global kvar to signify that the table has changed.



On Sun, 27 May 2018, 10:19 pm Rory Walsh, <[hidden email]> wrote:
Hi Kevin. I don't think there is an opcode for this, but it's possible I just missed it. You could probably write a UDO that reads through a table on each k cycle to look for changes?

On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
I have a cabbage instrument that uses a few variables (roughly 12) to generate an ftable, overwriting it in place with ftgen on the fly as the controls are tweaked.

Is there a way for other instruments or UDOs to detect changes to the ftable, with a behavior similar to how changed() or changed2() detects changes to a variable?
Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

tgrey
Rory, a krate UDO was one of the options I considered, creating an array (rather than another table, for easier portability in c2?) to store the values of all ftable points to compare during the next cycle for changes.  As John mentioned tho, this would likely be very expensive, and I'd imagine that expense would scale with the table size.  Which by the way, yes... the tables I'm intending this to work with are fairly small waveforms in the scheme of things, typically 8192 or 16384.  I guess I was hoping there might be an opcode I'm unfamiliar with that was able to perform entire table comparisons at once based on some backend memory comparisons or some other voodoo.  It was a shot in the dark, but I never really know what kind of crazy stuff you guys can pull off behind the scenes. ;)

A good followup question might be this:
Which would probably end up being more efficient, an extra call to changed() querying 12-16 variables, or looping through a 16384 table every kcycle and comparing each value against another table or array?  I'd bet on the former!

Thorin: This is going to be used with cabbage 2's new "imported widgets", so I'm trying to avoid global variables to keep the code cleanly portable and reusable/reentrant.  That said, the changed status could probably be written into and read from a unique channel since imported widgets inherit a channel "prefix", pseudo example:
  chnset 1, strcat(SChanPrefix,"HasChanged")
That ends up being unique for each instance, so if multiple copies of the widgets are initialized they can each behave individually.  I've done something very similar but for a very different purpose elsewhere... I'll give this some thought tonight, it might be a really easy solution I hadn't considered, thanks!


On Sun, May 27, 2018 at 10:31 AM, thorin kerr <[hidden email]> wrote:
Another option: Write a UDO which both overwrites the table, and sets a global kvar to signify that the table has changed.



On Sun, 27 May 2018, 10:19 pm Rory Walsh, <[hidden email]> wrote:
Hi Kevin. I don't think there is an opcode for this, but it's possible I just missed it. You could probably write a UDO that reads through a table on each k cycle to look for changes?

On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
I have a cabbage instrument that uses a few variables (roughly 12) to generate an ftable, overwriting it in place with ftgen on the fly as the controls are tweaked.

Is there a way for other instruments or UDOs to detect changes to the ftable, with a behavior similar to how changed() or changed2() detects changes to a variable?
Csound mailing list [hidden email] 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 [hidden email] 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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

patrick1983
In reply to this post by rorywalsh
Hi Rory I am e-mailing you because I have been studying your and jacob joaquin's work, "'Csoundo' (A csound library for Processing)" for csoundo's drawing functionality written in Java to be used along with ordinary C source file builds from the command line. I have already attained the following 2 directories of sources and build tools and 1 app:
1.) csoundo-master
2.) processing-master &
3.) Processing.app.
Do I need to build csoundo w/sources at all if I have the two directories I've mentioned above and the application Processing.app? Steps 2 & 3 in the "Building" section of the "csoundo/README" webpage/doc is where I have been getting stuck trying to build csoundo with the 'make.sh' file using the './make.sh' "run & make" command after I have copied 'core.jar' into the following path:
cd /Users/patrickalexander/Desktop/AudioFiles/csoundo-master/src 
This /src directory already includes 'csnd6.jar' and csoundo.jar along with other csoundo .jar, .java & .class files. I have copied 'core.jar' into this /src directory of csoundo-master and altered the .make.sh file, which is already included in the path above, to the form given here:

echo "BUILD SCRIPT FOR CSOUNDO."

echo ""

echo "PLEASE EDIT THE SCRIPTS VARIABLES"

echo "SO THAT IT USES THE CORRECT PATH"


PROCESSING_LIB=/Users/patrickalexander/Desktop/AudioFiles/csoundo-master/library/core.jar

CSOUND_LIB=/Users/patrickalexander/Desktop/AudioFiles/csoundo-master/library/csnd6.jar

javac -classpath $PROCESSING_LIB:$CSOUND_LIB -d . *.java

jar -cf ../library/csoundo.jar ./csoundo/*.class


When I try to run with ./make.sh I get the following output in the Terminal:

BUILD SCRIPT FOR CSOUNDO.


PLEASE EDIT THE SCRIPTS VARIABLES

SO THAT IT USES THE CORRECT PATH

Do you know what I am doing wrong (if anything) in terms of copying the core.jar, csnd6.jar, & possibly other .jar and similar Java base files (or building with Java) of csoundo, into csoundo-master/src and entering the appropriate PROCESSING_LIB & CSOUND_LIB paths to build csoundo with? Or (hopefully) command line code that could allow me to build with csoundo Java files and ordinary C source files? 


I'm not sure if I even have to run this build process since it seems to be outdated and I am using Csound version 6.10 which is pretty much up to date.

I want to use csoundo with Processing - can I just use gcc/g++ on the command-line in Terminal with a Java compiler somehow? 

The csound-master/examples .pde files are what has piqued my interest in using csoundo with Processing although I'm a newbie to Java programming and building.

Any information on using csoundo with Processing and Java with building would be greatly appreciated. I apologize about any inconvenience this may have caused you. Thank you for your time.

Patrick









On Sun, May 27, 2018 at 6:12 AM, Rory Walsh <[hidden email]> wrote:
I was thinking the same, although I get the impression Kevin is using relatively small tables?

On 27 May 2018 at 13:24, John ff <[hidden email]> wrote:
I do not think there is an opcode for this either.  Would be potentially expensive

⁣Sent from TypeApp ​

On May 27, 2018, 13:20, at 13:20, Rory Walsh <[hidden email]> wrote:
>Hi Kevin. I don't think there is an opcode for this, but it's possible
>I
>just missed it. You could probably write a UDO that reads through a
>table
>on each k cycle to look for changes?
>
>On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
>
>> I have a cabbage instrument that uses a few variables (roughly 12) to
>> generate an ftable, overwriting it in place with ftgen on the fly as
>the
>> controls are tweaked.
>>
>> Is there a way for other instruments or UDOs to detect changes to the
>> ftable, with a behavior similar to how changed() or changed2()
>detects
>> changes to a variable?
>> Csound mailing list [hidden email]
>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
>[hidden email]
>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
[hidden email]
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 [hidden email] 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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] detecting changes to an ftable?

rorywalsh
You don't need to build Csoundo yourself, unless you're working on Linux.There are prebuilt packages here:
I tested this package some weeks ago and it ran fine for me. So the next question is what exactly are you trying to do?

On 29 May 2018 at 02:03, Patrick Hinkle <[hidden email]> wrote:
Hi Rory I am e-mailing you because I have been studying your and jacob joaquin's work, "'Csoundo' (A csound library for Processing)" for csoundo's drawing functionality written in Java to be used along with ordinary C source file builds from the command line. I have already attained the following 2 directories of sources and build tools and 1 app:
1.) csoundo-master
2.) processing-master &
3.) Processing.app.
Do I need to build csoundo w/sources at all if I have the two directories I've mentioned above and the application Processing.app? Steps 2 & 3 in the "Building" section of the "csoundo/README" webpage/doc is where I have been getting stuck trying to build csoundo with the 'make.sh' file using the './make.sh' "run & make" command after I have copied 'core.jar' into the following path:
cd /Users/patrickalexander/Desktop/AudioFiles/csoundo-master/src 
This /src directory already includes 'csnd6.jar' and csoundo.jar along with other csoundo .jar, .java & .class files. I have copied 'core.jar' into this /src directory of csoundo-master and altered the .make.sh file, which is already included in the path above, to the form given here:

echo "BUILD SCRIPT FOR CSOUNDO."

echo ""

echo "PLEASE EDIT THE SCRIPTS VARIABLES"

echo "SO THAT IT USES THE CORRECT PATH"


PROCESSING_LIB=/Users/patrickalexander/Desktop/AudioFiles/csoundo-master/library/core.jar

CSOUND_LIB=/Users/patrickalexander/Desktop/AudioFiles/csoundo-master/library/csnd6.jar

javac -classpath $PROCESSING_LIB:$CSOUND_LIB -d . *.java

jar -cf ../library/csoundo.jar ./csoundo/*.class


When I try to run with ./make.sh I get the following output in the Terminal:

BUILD SCRIPT FOR CSOUNDO.


PLEASE EDIT THE SCRIPTS VARIABLES

SO THAT IT USES THE CORRECT PATH

Do you know what I am doing wrong (if anything) in terms of copying the core.jar, csnd6.jar, & possibly other .jar and similar Java base files (or building with Java) of csoundo, into csoundo-master/src and entering the appropriate PROCESSING_LIB & CSOUND_LIB paths to build csoundo with? Or (hopefully) command line code that could allow me to build with csoundo Java files and ordinary C source files? 


I'm not sure if I even have to run this build process since it seems to be outdated and I am using Csound version 6.10 which is pretty much up to date.

I want to use csoundo with Processing - can I just use gcc/g++ on the command-line in Terminal with a Java compiler somehow? 

The csound-master/examples .pde files are what has piqued my interest in using csoundo with Processing although I'm a newbie to Java programming and building.

Any information on using csoundo with Processing and Java with building would be greatly appreciated. I apologize about any inconvenience this may have caused you. Thank you for your time.

Patrick









On Sun, May 27, 2018 at 6:12 AM, Rory Walsh <[hidden email]> wrote:
I was thinking the same, although I get the impression Kevin is using relatively small tables?

On 27 May 2018 at 13:24, John ff <[hidden email]> wrote:
I do not think there is an opcode for this either.  Would be potentially expensive

⁣Sent from TypeApp ​

On May 27, 2018, 13:20, at 13:20, Rory Walsh <[hidden email]> wrote:
>Hi Kevin. I don't think there is an opcode for this, but it's possible
>I
>just missed it. You could probably write a UDO that reads through a
>table
>on each k cycle to look for changes?
>
>On 26 May 2018 at 13:30, Kevin Welsh <[hidden email]> wrote:
>
>> I have a cabbage instrument that uses a few variables (roughly 12) to
>> generate an ftable, overwriting it in place with ftgen on the fly as
>the
>> controls are tweaked.
>>
>> Is there a way for other instruments or UDOs to detect changes to the
>> ftable, with a behavior similar to how changed() or changed2()
>detects
>> changes to a variable?
>> Csound mailing list [hidden email]
>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
>[hidden email]
>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
[hidden email]
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 [hidden email] 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 [hidden email] 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 [hidden email] 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