If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
It may be possible to make ruby base64 a wav
3 posts
• Page 1 of 1
It may be possible to make ruby base64 a wav
I was thinking about Ruby and patches for let's say a synth. It'd be great if all of the samples were in the dll somehow; but obviously that would require them being text. It may be possible to do such a thing with ruby, has anyone else had experiences with such a thing in ruby? And not so much in ruby on rails?
Or, like let's say a standalone .exe that would allow adding presets and samples. It might not work, but it may. It's too bad such an idea would not work with .exe's too.
Or, like let's say a standalone .exe that would allow adding presets and samples. It might not work, but it may. It's too bad such an idea would not work with .exe's too.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: It may be possible to make ruby base64 a wav
There seem to be two related questions that need answering here...
- Can sample data be stored in String format?
Yes, but there's no sensible reason for doing so. "WaveArray" and "WaveFile" primitives store all of their sample data in schematics and exports anyway, so permanent sample storage is already possible. Storing the data as text and decoding it on-demand would simply make switching presets incredibly slow (Ruby is not quick at working with large data sets and there would actually be a chain of conversions: String -> Ruby Array -> Green Array -> Mem). Base64 would only make that problem worse - it increases file size and makes decoding more complex. I would be absolutely stunned if this were anywhere near as fast as loading samples from disk - and slow preset changes are NOT a customer-friendly feature!!
NB: Base64 is usually only necessary for internet resources. For purely internal data, Ruby allows "binary" Strings which can contain web-unsafe characters (including "null"). You have to be a bit more careful with "green" Strings, though, as they are strictly ASCII and are null-terminated.
- Can preset data inside a DLL or EXE be changed during runtime?
No, never. You would have to be able to re-compile the entire schematic, but without having the FS workspace present. It's very unlikely that you could update the file in any case - exe's and dll's are usually locked for writing whenever they are loaded for execution (and trying to do it could well get flagged as a sign of malware).
- Can sample data be stored in String format?
Yes, but there's no sensible reason for doing so. "WaveArray" and "WaveFile" primitives store all of their sample data in schematics and exports anyway, so permanent sample storage is already possible. Storing the data as text and decoding it on-demand would simply make switching presets incredibly slow (Ruby is not quick at working with large data sets and there would actually be a chain of conversions: String -> Ruby Array -> Green Array -> Mem). Base64 would only make that problem worse - it increases file size and makes decoding more complex. I would be absolutely stunned if this were anywhere near as fast as loading samples from disk - and slow preset changes are NOT a customer-friendly feature!!
NB: Base64 is usually only necessary for internet resources. For purely internal data, Ruby allows "binary" Strings which can contain web-unsafe characters (including "null"). You have to be a bit more careful with "green" Strings, though, as they are strictly ASCII and are null-terminated.
- Can preset data inside a DLL or EXE be changed during runtime?
No, never. You would have to be able to re-compile the entire schematic, but without having the FS workspace present. It's very unlikely that you could update the file in any case - exe's and dll's are usually locked for writing whenever they are loaded for execution (and trying to do it could well get flagged as a sign of malware).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: It may be possible to make ruby base64 a wav
Depending my experience, unfortunately Ruby is not the right platform for playing with translations from one format to another. Back then I tried to use ruby as a "pipe" to manipulate streamed wave array data. The schematic went into endless loading process until I've decided to give up and reset my computer. Never tried again...
By the way, Trog, please check up your PM.
By the way, Trog, please check up your PM.
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 62 guests