Quantcast

always-on instrument

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

always-on instrument

Menno Knevel
Hi,

i am working on improving the ImagePlayer; JavaFX provides this opportunity and would like to know what the Always-On instrument tab inside the Orchestra can do (for me).

What i am thinking of:
- divide ImagePlayer into 2 instruments: ImagePlayer and ImageSelector

Idea is that:
- ImageSelector can load several images
- a number or name is given to that image
- later in the composition the different imagenumbers or imagenames can be referenced to by ImagePlayer

Problem is that the ImagesSelector must be global but that i won't start the composition every time from the start. Could the Always-On instrument be a solution? What is the purpose of this Always-On Instrument?

In my case, i would prefer that the ImageSelector would load the image in memory AND process the red, green and blue pixels already. So that the pixel values are already available and the only thing ImagePlayer would have to do is produce sound using these values. This means, the ImageSelector should be a Global instrument for the pixel values to be available later in the composition. This does not work because Instrument 0 is not k-rate and thus cannot process the pixels.
But Instrument 0 won't allow k-rate.

How does the Always-On Instrument work?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: always-on instrument

Menno Knevel
...just found it in the Blue manual...Always-On is for effects, so its place is AFTER the instrument itself. Not what i am looking for.
But perhaps someone has an idea how to accomplish what i want?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: always-on instrument

Steven Yi
Sorry for late reply! I think that always-on may not be only for
effects, but could also be used to create monophonic synths where the
main instrument code just influences key on/off and pitch or things
like that.

But I'm not sure this is what you need here. You might be able to use
the file selector with string channels enabled and create multiple
selectors in your instrument. At the beginning of your instrument
code, you could have it read the various string values and put them
into an array, then index into the array using p-field.

I'm not sure of any good option for pre-loading of image data though.
I suppose one thing that could happen is you have two instruments, one
that sets values and one that uses them. In the setter instrument, you
could have the image file selectors using string channels. In the
instrument code (in this case, could be an always on), have it read
the file name and check whether it is the same as the previous value
(stored in its own variables). If the value has changed, you could do
the image file loading then.  That instrument would be running all the
time and most of the time wouldn't do too much as the values won't
change from the string channels.  However, when the file does change,
it would process everything.

Hope that helps!
steven

On Sun, Feb 5, 2017 at 6:58 AM, Menno Knevel <[hidden email]> wrote:

> ...just found it in the Blue manual...Always-On is for effects, so its place
> is AFTER the instrument itself. Not what i am looking for.
> But perhaps someone has an idea how to accomplish what i want?
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/always-on-instrument-tp5754293p5754294.html
> Sent from the Csound - Blue - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Bluemusic-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bluemusic-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bluemusic-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: always-on instrument

Menno Knevel
Still thinking on this issue of preloading soundfiles:
when i use for example the Xlooper and load it with soundfiles, i can see that every time a note in the Object is played, the same sound files are loaded in again and again on each note.
Screenshot_from_2017-03-10_12-12-10.png

I have experimented the file loading from global to local, both with the same result:
Screenshot_from_2017-03-10_12-14-52.png
Here you can just see at the very beginning on the left the first soundfiles being loaded in memory and halfway the second note forces the same soundfiles to be reloaded in memory as well.
Then, when the 2 notes are finished, the soundfiles are removed from memory.

I have tried using JMask with Xlooper, that produces dozens of notes; the memory is full in a matter of seconds and the system will start using the swap file - until it chokes and Blue stops working and disappears.

Why are not the soundfiles loaded into memory one time ( for example with a separate global instrument?)  so that all the instruments that are pointing to those soundfiles (already in memory!) can contain hundreds of notes and just pointing to those soundfiles?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: always-on instrument

Menno Knevel
This last issue of mine is solved and thus can be disregarded.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: always-on instrument

Steven Yi
Thanks for the follow up and glad you got things working.

On Sun, Mar 19, 2017 at 9:16 AM, Menno Knevel <[hidden email]> wrote:

> This last issue of mine is solved and thus can be disregarded.
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/always-on-instrument-tp5754293p5755157.html
> Sent from the Csound - Blue - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Bluemusic-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bluemusic-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bluemusic-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-users
Loading...