Storing samples in my app
Date | 2016-02-27 11:58 |
From | Peter Burgess |
Subject | Storing samples in my app |
I am facing a dilema for my app. I would like to be able to acquire sample packs to be used by my app. This would require me sending out the samples as part of my package. Unfortunately, most sample packs, both free and paid for, prohibit redistribution. A work around I though of for this would be to copy the contents of the .wav files and store it in my code somewhere, rather than as a separate file. That way I haven't redistributed the file itself, and the end user can't specifically access it. Now, forgetting for a moment as to whether this would still breach the license conditions or not (I'm going to have to do some research and probably contact specific sample distributors to ask their permission), is Csound capable of working with samples in a way that would allow me to do that? Pete |
Date | 2016-02-27 12:05 |
From | Tarmo Johannes |
Subject | Re: Storing samples in my app |
I think makecsd utility is a tool by csound where you can embed binary files to your csd. 27.02.2016 13:58 kirjutas kuupäeval "Peter Burgess" <pete.soundtechnician@gmail.com>:
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
I am facing a dilema for my app. I would like to be able to acquire |
Date | 2016-02-27 12:19 |
From | Peter Burgess |
Subject | Re: Storing samples in my app |
You're right, I'm gonna have to be clever. On the one hand, if I use too many different samples, the app will get very big. On the other hand, if I use too much synthesis, the app could get really performance heavy. Finding the right balance is going to be tricky, but not impossible Having just had a look, I'm up to 35MB of samples. I've still got to turn some of these mono, there's no need for most of the samples I've got so far to be stereo, so that'll take a chunk off the 35MB. That's not too bad, but I only have a very basic set so far. I should probably start thinking about how much space I will allow for samples, and which kind of sounds would benefit most from using samples. Of course, one thing that will allow for more sample space is that each genre is going to be a pluggin, so if every genre came with it's own samples, people would only need space for the samples relating to the genres they actually want. As for how to include the samples, I was considering storing them in the c++ part of my app some how. Are there any opcodes that can take a pointer to audio loaded into memory? That might be one answer. On Sat, Feb 27, 2016 at 12:05 PM, Tarmo Johannes |
Date | 2016-02-27 12:35 |
From | Richard |
Subject | Re: Storing samples in my app |
I'm much a fan of databases for this, e.g. SQLite. You can store the samples as blogs (binary large objects)... Maybe someday I'll write a csound opcode to read SQLite data into a Csound table. Richard On 27/02/16 13:19, Peter Burgess wrote: > You're right, I'm gonna have to be clever. On the one hand, if I use > too many different samples, the app will get very big. On the other > hand, if I use too much synthesis, the app could get really > performance heavy. Finding the right balance is going to be tricky, > but not impossible > > Having just had a look, I'm up to 35MB of samples. I've still got to > turn some of these mono, there's no need for most of the samples I've > got so far to be stereo, so that'll take a chunk off the 35MB. That's > not too bad, but I only have a very basic set so far. I should > probably start thinking about how much space I will allow for samples, > and which kind of sounds would benefit most from using samples. Of > course, one thing that will allow for more sample space is that each > genre is going to be a pluggin, so if every genre came with it's own > samples, people would only need space for the samples relating to the > genres they actually want. > > As for how to include the samples, I was considering storing them in > the c++ part of my app some how. Are there any opcodes that can take a > pointer to audio loaded into memory? That might be one answer. > > On Sat, Feb 27, 2016 at 12:05 PM, Tarmo Johannes > |
Date | 2016-02-27 13:40 |
From | Anders Genell |
Subject | Re: Storing samples in my app |
Oh, that would be fantastic! A database opcode! Regarding samples, maybe one additional option would be to render som samples with csound offline before starting performance? The user could get a progression bar and see part of the required sample library be populated and then the performance could use a combination of pre-installed and rendered samples as well as real-time synthesis. Also, maybe it would be allowed to link to some samples so that they can be installed from the original source as needed? Regards, Anders > 27 feb. 2016 kl. 13:35 skrev Richard |
Date | 2016-02-27 14:13 |
From | Peter Burgess |
Subject | Re: Storing samples in my app |
The database idea does sound interesting, and would certainly fit my needs. If you do happen to write that opcode, I'll be excited to hear about it :D Offline rendering is a great idea! That would definitely be a good way to keep both app size and performance constraints down :D On Sat, Feb 27, 2016 at 1:40 PM, Anders Genell |
Date | 2016-02-28 11:10 |
From | Richard |
Subject | Re: Storing samples in my app |
As an alternative, I think it should be possible to use SQLite right
now in Csound with the built-in python opcodes.. This seems to work: pyinit
pyruni {{ import sqlite3 as lite import sys con = lite.connect('test.db') }}and then also define a function that gets the result from a query. then call this function with pycalli that would have to iterate over the query result then in a normal csound loop write the result to a table I'll try this appoach first... Richard On 27/02/16 14:40, Anders Genell wrote:
Oh, that would be fantastic! A database opcode! Regarding samples, maybe one additional option would be to render som samples with csound offline before starting performance? The user could get a progression bar and see part of the required sample library be populated and then the performance could use a combination of pre-installed and rendered samples as well as real-time synthesis. Also, maybe it would be allowed to link to some samples so that they can be installed from the original source as needed? Regards, Anders27 feb. 2016 kl. 13:35 skrev Richard <zappfinger@GMAIL.COM>: I'm much a fan of databases for this, e.g. SQLite. You can store the samples as blogs (binary large objects)... Maybe someday I'll write a csound opcode to read SQLite data into a Csound table. RichardOn 27/02/16 13:19, Peter Burgess wrote: You're right, I'm gonna have to be clever. On the one hand, if I use too many different samples, the app will get very big. On the other hand, if I use too much synthesis, the app could get really performance heavy. Finding the right balance is going to be tricky, but not impossible Having just had a look, I'm up to 35MB of samples. I've still got to turn some of these mono, there's no need for most of the samples I've got so far to be stereo, so that'll take a chunk off the 35MB. That's not too bad, but I only have a very basic set so far. I should probably start thinking about how much space I will allow for samples, and which kind of sounds would benefit most from using samples. Of course, one thing that will allow for more sample space is that each genre is going to be a pluggin, so if every genre came with it's own samples, people would only need space for the samples relating to the genres they actually want. As for how to include the samples, I was considering storing them in the c++ part of my app some how. Are there any opcodes that can take a pointer to audio loaded into memory? That might be one answer. On Sat, Feb 27, 2016 at 12:05 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:I think makecsd utility is a tool by csound where you can embed binary files to your csd. No idea, how it works on android though, probably it can be a permission issue and you need to create temporay files anyway. How are you going to solve the size problem? You probably don't want your app grow too big? Tarmo 27.02.2016 13:58 kirjutas kuupäeval "Peter Burgess" <pete.soundtechnician@gmail.com>:I am facing a dilema for my app. I would like to be able to acquire sample packs to be used by my app. This would require me sending out the samples as part of my package. Unfortunately, most sample packs, both free and paid for, prohibit redistribution. A work around I though of for this would be to copy the contents of the .wav files and store it in my code somewhere, rather than as a separate file. That way I haven't redistributed the file itself, and the end user can't specifically access it. Now, forgetting for a moment as to whether this would still breach the license conditions or not (I'm going to have to do some research and probably contact specific sample distributors to ask their permission), is Csound capable of working with samples in a way that would allow me to do that? Pete -- http://algorythmradio.com https://soundcloud.com/algorythmradio 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 hereCsound 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 hereCsound 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 hereCsound 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 |