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
Reading Loop points from WAV file - possible?
13 posts
• Page 1 of 2 • 1, 2
Reading Loop points from WAV file - possible?
Hi,
I have a lot of WAV files with loops (made them for my Kontakt sample libraries), some of which I would like to use for my FS project. I was searching forum on this subject, but no luck.
Can anyone, please clarify if it is possible for FS to recognize WAV Loop points? If not - what would be possible solution?
Thanks!
Ray
I have a lot of WAV files with loops (made them for my Kontakt sample libraries), some of which I would like to use for my FS project. I was searching forum on this subject, but no luck.
Can anyone, please clarify if it is possible for FS to recognize WAV Loop points? If not - what would be possible solution?
Thanks!
Ray
-
Julian Ray - Posts: 23
- Joined: Tue Jun 18, 2019 2:58 pm
- Location: CANADA
Re: Reading Loop points from WAV file - possible?
Assuming the loop points are stored in the standard way for a WAV file, then yes it's possible - but not especially easy.
Ruby can read files as raw bytes, and then decode them into whatever kind of data they represent; so if you know how a file format is laid out, it's possible to decode just about anything.
I have had a play at decoding WAV files in the past, though I didn't gt particularly far. Below is the old project file, which you're free to cherry-pick if its at all useful to you - it'll give you a sense of what you'd be letting yourself in for, at least! From a cursory look, I can't tell exactly which chunks of a wav its able to read - you might get lucky and see your marker/loop data, or you might not - good luck!
Ruby can read files as raw bytes, and then decode them into whatever kind of data they represent; so if you know how a file format is laid out, it's possible to decode just about anything.
I have had a play at decoding WAV files in the past, though I didn't gt particularly far. Below is the old project file, which you're free to cherry-pick if its at all useful to you - it'll give you a sense of what you'd be letting yourself in for, at least! From a cursory look, I can't tell exactly which chunks of a wav its able to read - you might get lucky and see your marker/loop data, or you might not - good luck!
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: Reading Loop points from WAV file - possible?
Thank you very much for the explanation and example - I'll definitely study it and see for how deep I can understand it
Cheers!
Cheers!
-
Julian Ray - Posts: 23
- Joined: Tue Jun 18, 2019 2:58 pm
- Location: CANADA
Re: Reading Loop points from WAV file - possible?
There are also two projects from KGisback, one of it specifically a wave file reader, that was quite advanced. But you would need to use the search function (or Google's site search) to find it, because I forgot about the title.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Reading Loop points from WAV file - possible?
its better if you search for "KG_is_back", thats the username
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Reading Loop points from WAV file - possible?
Thanks guys, I'll search it right now
-
Julian Ray - Posts: 23
- Joined: Tue Jun 18, 2019 2:58 pm
- Location: CANADA
Re: Reading Loop points from WAV file - possible?
Not sure if this would be of any use but while researching SDR, I came across this reference to parsing a wav in C.
http://truelogic.org/wordpress/2015/09/ ... file-in-c/
Maybe can glean some helpful hints, or convert code to assembler maybe, idk.
http://truelogic.org/wordpress/2015/09/ ... file-in-c/
Maybe can glean some helpful hints, or convert code to assembler maybe, idk.
- acg2010
- Posts: 80
- Joined: Tue Oct 05, 2010 3:18 am
Re: Reading Loop points from WAV file - possible?
I don’t know if this could help trog to modify his Ruby code, but I’ve attached a short WAV which does loop nicely, and a screenshot of the Wavosaur properties which show the loop start and end samples.
I imagine agc2010 wants only the loop sample values for a player.
Cheers
Spogg
I imagine agc2010 wants only the loop sample values for a player.
Cheers
Spogg
- Attachments
-
- Looping WAV with loop points info.zip
- (369.72 KiB) Downloaded 836 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Reading Loop points from WAV file - possible?
Thanks for the example file, Spogg, and for the code example, agc2010 (I would have included the research links from my old project - but they were all broken!)
Having had a bit more of a look at my old code, I think that extracting the other data "chunks" should be possible by adding their structures to the table at the beginning. I'll need to think a bit more about the parser though, as I don't think it will handle tables nested within tables properly yet; and if I remember the WAV format correctly, loop points require cross-referencing data from two different "chunks". Coincidentally, one of my current projects is a MIDI SysEx decoder which does exactly the same kind of memory-mapped data extraction - it's a similar enough problem that I may well end up with code that can be re-used here.
Having had a bit more of a look at my old code, I think that extracting the other data "chunks" should be possible by adding their structures to the table at the beginning. I'll need to think a bit more about the parser though, as I don't think it will handle tables nested within tables properly yet; and if I remember the WAV format correctly, loop points require cross-referencing data from two different "chunks". Coincidentally, one of my current projects is a MIDI SysEx decoder which does exactly the same kind of memory-mapped data extraction - it's a similar enough problem that I may well end up with code that can be re-used here.
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: Reading Loop points from WAV file - possible?
Can we write Loop points TO a wav file?
-
guyman - Posts: 207
- Joined: Fri Mar 02, 2018 8:27 pm
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 77 guests