Database for GEN

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

Database for GEN

Gpp
Dear Qutecsound developers,

I hope you can help me.
I am using QCsound combined with Open Music, that allows me to create several functions tables for the GEN functions.
Now I have collected thousends of tables. All these data are of course to heavy to use in realtime, but it would be fantastic to load all of them in a single .csd file and to pick up one by one using a menu while running Qtcsound. Would it be possible to create a database that stores the tables with a minimum expenditure of RAM?  
Thank you.

Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

joachim-3
hi giuseppe -

this sounds to me more like a question how to order your tables and how
to select some of them. can you describe more in detail what you mean by
"to pick up one by one using a menu while running Qtcsound"?

best -

        joachim


Am 28.03.2013 08:48, schrieb Gpp:

> Dear Qutecsound developers,
>
> I hope you can help me.
> I am using QCsound combined with Open Music, that allows me to create
> several functions tables for the GEN functions.
> Now I have collected thousends of tables. All these data are of course to
> heavy to use in realtime, but it would be fantastic to load all of them in a
> single .csd file and to pick up one by one using a menu while running
> Qtcsound. Would it be possible to create a database that stores the tables
> with a minimum expenditure of RAM?
> Thank you.
>
> Gpp
>
>
>
> --
> View this message in context: http://qutecsound-users.829572.n3.nabble.com/Database-for-GEN-tp4025025.html
> Sent from the QuteCsound Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Qutecsound-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qutecsound-users
>

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Rory Walsh
You could use an #include to load a single text file containing all
your tables, this will get thrown to RAM when Csound first fires up.
Then you can just toggle through the tables using a menu widget?

k1 chnget "tableNumber"
kTableData oscilikt iamp, ifreq, k1

Of course it all depends on what you are doing with your data. If you
don't want to load all tables to RAM first you can look at using the
event opcodes to instantiate tables in real time. I do this to avoid
loading 1000's of audio samples until I need them.

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
Thank you,
sorry, I don't have any experience with chnget and #include.
Do you mean something like this?

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1

instr 1
k1 chnget "functions.txt"
asound osciliktp   440, k1, 0
outs asound, asound
endin

</CsInstruments>
<CsScore>

#include "functions.txt"
i1 0 1000
e
</CsScore>
</CsoundSynthesizer>
 
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
In reply to this post by joachim-3
Hi Joachim,
sorry if I am not understable.
What I mean is that instead of coping in the score thousends of tables maybe there is a more economical way to store all the datas in a secondary file, loaded in the score. Then, for example using the widget menu, I may select the tables to use. I hope this is clear.
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Rory Walsh
In reply to this post by Gpp
Your text file might look like this:

f 1 0 16384 10 1

And in your score you do as you wrote,

#include "mytables.txt"

This will cause Csound to insert all the table text into your score
when it starts. In order to pick which tables are used you need to add
a menu widget to the widgets panel. The widget will communicate with
Csound on a named channel that you define yourself in the widget
properties, the same name will be used with the chnget opcode. Each
time you change the menu value, the index will be sent to Csound on
that named channel. So a more complete picture would look like this:

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1

instr   1
k1 chnget "named_menu_channel"
asound osciliktp   440, 1, k1
outs asound, asound
endin

</CsInstruments>
<CsScore>
#include "functions.txt"
i1 0 1000
</CsScore>
</CsoundSynthesizer>

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

joachim-3
In reply to this post by Gpp
yes, thanks, it's more clear now. but i still think there are different
options depending on what you want to do exactly:
1) if you only want to avoid to copy-paste your thousands of tables in
the score, simply use the #include feature as rory has shown. but then
you have all your tables in the RAM, though you probably only use some
dozens of it.
2) if you want to avoid this you could simply consider to split your
large collection in many smaller ones, and load them, for instance
#include my_best_harmonics.txt
#include my_cheby.txt
3) if you only want to load specific tables in real-time, rory mentioned
the event or event_i opcode to send an f-event.
4) if you know a bit of python you could use the python feature in
csoundqt to automatically generate score text with selections of your
tables.
so many possibilities ... good success and let us know if you need any
further help -
        joachim



Am 28.03.2013 12:03, schrieb Gpp:

> Hi Joachim,
> sorry if I am not understable.
> What I mean is that instead of coping in the score thousends of tables maybe
> there is a more economical way to store all the datas in a secondary file,
> loaded in the score. Then, for example using the widget menu, I may select
> the tables to use. I hope this is clear.
>
>
>
> --
> View this message in context: http://qutecsound-users.829572.n3.nabble.com/Database-for-GEN-tp4025025p4025029.html
> Sent from the QuteCsound Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Qutecsound-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qutecsound-users
>

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
In reply to this post by Rory Walsh
Thank you very much,

I have tried but I have this message back:

new alloc for instr 1:
PERF ERROR in instr 1: Invalid ftable no. 0.000000
asound osciliktp 440 k1 1 0
   note aborted


One of the table looks like:
f 1049 0 8192 10 .0000 .0300 .0700 .1300 .2700 .1900 .1200 .0800 .0600 .0400 .0300 .0200 .0100 .0100 .0100 .0000 .0000 .0000 .0000 .0000 .0000

The channel name of the menu controlling
k1 chnget "wave1"
is "wave1"

I don't understand what is wrong
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Rory Walsh
Most likely it's because the menu widget sends a 0 on startup as it's
first position. I don't use CsoundQT much so I can't say, but you
could try summing a 1 to k1 on the same line as you pass k1 to the
oscillator?

On 28 March 2013 12:57, Gpp <[hidden email]> wrote:

> Thank you very much,
>
> I have tried but I have this message back:
>
> new alloc for instr 1:
> PERF ERROR in instr 1: Invalid ftable no. 0.000000
> asound  osciliktp       440     k1      1       0
>    note aborted
>
>
> One of the table looks like:
> f 1049   0       8192    10      .0000   .0300   .0700   .1300   .2700   .1900   .1200   .0800
> .0600    .0400   .0300   .0200   .0100   .0100   .0100   .0000   .0000   .0000   .0000
> .0000    .0000
>
> The channel name of the menu controlling
> k1 chnget "wave1"
> is "wave1"
>
> I don't understand what is wrong
>
>
>
> --
> View this message in context: http://qutecsound-users.829572.n3.nabble.com/Database-for-GEN-tp4025025p4025032.html
> Sent from the QuteCsound Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Qutecsound-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qutecsound-users

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

joachim-3
best would be to attach your .csd file, including the widget panel data.
we can try it then and help -
        joachim


Am 28.03.2013 14:03, schrieb Rory Walsh:

> Most likely it's because the menu widget sends a 0 on startup as it's
> first position. I don't use CsoundQT much so I can't say, but you
> could try summing a 1 to k1 on the same line as you pass k1 to the
> oscillator?
>
> On 28 March 2013 12:57, Gpp <[hidden email]> wrote:
>> Thank you very much,
>>
>> I have tried but I have this message back:
>>
>> new alloc for instr 1:
>> PERF ERROR in instr 1: Invalid ftable no. 0.000000
>> asound  osciliktp       440     k1      1       0
>>     note aborted
>>
>>
>> One of the table looks like:
>> f 1049   0       8192    10      .0000   .0300   .0700   .1300   .2700   .1900   .1200   .0800
>> .0600    .0400   .0300   .0200   .0100   .0100   .0100   .0000   .0000   .0000   .0000
>> .0000    .0000
>>
>> The channel name of the menu controlling
>> k1 chnget "wave1"
>> is "wave1"
>>
>> I don't understand what is wrong
>>
>>
>>
>> --
>> View this message in context: http://qutecsound-users.829572.n3.nabble.com/Database-for-GEN-tp4025025p4025032.html
>> Sent from the QuteCsound Users mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
>> Rise to greatness in Intel's independent game demo contest.
>> Compete for recognition, cash, and the chance to get your game
>> on Steam. $5K grand prize plus 10 genre and skill prizes.
>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
>> _______________________________________________
>> Qutecsound-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/qutecsound-users
>
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Qutecsound-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qutecsound-users
>

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
In reply to this post by joachim-3
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

joachim-3
okay, the problem is that your function tables start with number 1049,
so you have to add 1049 to your k1 value. i do attach a csd which also
contains a printout for the table you have selected.
best -
        joachim


Am 28.03.2013 15:36, schrieb Gpp:

> Sorry...
>
> K_wave_pro.csd
> <http://qutecsound-users.829572.n3.nabble.com/file/n4025036/K_wave_pro.csd>
>
> 3_Interp_mirror-Gen10-20p.txt
> <http://qutecsound-users.829572.n3.nabble.com/file/n4025036/3_Interp_mirror-Gen10-20p.txt>
>
>
>
> --
> View this message in context: http://qutecsound-users.829572.n3.nabble.com/Database-for-GEN-tp4025025p4025036.html
> Sent from the QuteCsound Users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Own the Future-Intel&reg; Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Qutecsound-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qutecsound-users
>

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users

K_wave_pro.csd (4K) Download Attachment
Gpp
Reply | Threaded
Open this post in threaded view
|

Re: [Qutecsound-users] Database for GEN

Gpp
Perfect,

thank you very much to both of you.

Best,

Giuseppe